Wednesday, March 7, 2012

problem with reordering of rows

I am using MSSQL 2000, I need to display a cv page in which a person projects are displayed the way he enters them into the database and he should be able to reorder the projects according to the proirity. I have no clue how to do this ? I am a newbie in asp.net,C# field.

I searched info on google and forums but didn't find anything related to my understanding. I'am displaying all his projects using a Projects table in which i have four columns ProjectID, ProjTitle, ProjDirector, ProjDescription. i want the user to be able to reorder the
projects row by moving a task up or down based on priority.Any help will be greatly appreciated .. I am really stuck and frustatedCrying [:'(] with this task ..please help me friends..

Thank you very much

can you please help me friends in the above problem...

Thank you

|||

Can two projects have the same Title? I would immagine that would be confusing -- if Title is supposed to be unique, then make it the PK. Also, your column names contain the prefix "Proj" -- unecessary.

To answer your question, though, simply add a column called Display_Sequence. Then your insert statement would be

INSERT INTO Projects
(Title, Director, Description, Display_Seq)
SELECT 'My Project', 'Jim Jones', 'This is my project', MAX(Display_Seq)
FROM Projects

No comments:

Post a Comment