PDA

Click to See Complete Forum and Search --> : Sorting dates depending on the priority


Murali
Jan 28th, 2000, 02:30 PM
Hi all,

i have table with activity_no,start_dt,Target_dt,Priority.
lower priority activity should start after the start_dt of higher priority.So if i modify the priority of already present activity then all starting_dates has to be rearranged.
OR
Sorting dates with respect to priority modified.

can anyone give some ideas or suggest some sites.

thankx
Murali

JHausmann
Jan 30th, 2000, 01:51 AM
The short answer is create a primary key if you can.

A table's primary key determines it's 'natural' sort order (queries without order by's will return sorted by primary key). The major drawback is that it must be unique. Another drawback will be if you do significant amounts of "priority changing" the database will need maintenance (jet DB's will need to be compacted, SQL databases may need dumping and reloading) because your table's data pages will get fragmented.

Clunietp
Jan 30th, 2000, 03:37 AM
or you could just use ORDER BY statements in your queries

Murali
Jan 30th, 2000, 11:08 AM
Hi,
What u r telling is fine.But my problem is after entering the valid datas',if any one changes the priority value then all the entered starting dates has propatianetly to be changed through hard code.something like microsoft schedulers.