Results 1 to 4 of 4

Thread: Sorting dates depending on the priority

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 1999
    Location
    chennai,tamilnadu,india
    Posts
    29

    Post

    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


  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105

    Post

    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.


  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    or you could just use ORDER BY statements in your queries

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Oct 1999
    Location
    chennai,tamilnadu,india
    Posts
    29

    Post

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width