jfgambit
Kinetic Card Dealer
- Local time
- Today, 21:41
- Joined
- Jul 18, 2002
- Messages
- 798
I was wondering if anyone had some experience with creating a module to rank according to a priority. I know how to create a module and query to rank based on a cost or date, but this is a little different.
I have a table tblTicketEsc that contains the following fields:
TicketID - Unique Ticket Escalation ID
PriorityID - Current Priority Ranking ( 1 - n )
ManPriorityID - Manually entered Priority Ranking (1 - n)
I have a table tblTicketEsc that contains the following fields:
TicketID - Unique Ticket Escalation ID
PriorityID - Current Priority Ranking ( 1 - n )
ManPriorityID - Manually entered Priority Ranking (1 - n)
Code:
Example:
TicketID PriorityID ManPriorityID
12345 1
12346 2
12347 3
I want to be able to add a number to ManPriorityID and have all the other numbers re-rank based on the Manual number entered.
[U]Example:[/U]
TicketID PriorityID ManPriorityID
12345 1
12346 2 1 <--I enter this number
12347 3
[U]Becomes:[/U]
TicketID PriorityID ManPriorityID
12346 1
12345 2
12347 3
[U]Another Example:[/U]
TicketID PriorityID ManPriorityID
12345 1 3<--I enter this number
12346 2
12347 3 1 <--I enter this number
[U]Becomes:[/U]
TicketID PriorityID ManPriorityID
12347 1
12346 2
12345 3