Dear all,
I have an SQL statement that moves records up and down a priority list. I currently use a database results region to manipulate the correct record thus....
UPDATE WorkToList
SET PriorityNumber = PriorityNumber -1
Where Wnumber= ::Wnumber::
This works really well, but I would also like for the statement to find the previous priority number and add 1 to the value. (Thus swapping the priority of the records) The only way I can figure out to do this is to have another database results region on the same page with a similar statement.
Is there a way that I can use multiple SQL statements on the same page without doing the above - as it seems really inefficient.
Thanks in advance
I have an SQL statement that moves records up and down a priority list. I currently use a database results region to manipulate the correct record thus....
UPDATE WorkToList
SET PriorityNumber = PriorityNumber -1
Where Wnumber= ::Wnumber::
This works really well, but I would also like for the statement to find the previous priority number and add 1 to the value. (Thus swapping the priority of the records) The only way I can figure out to do this is to have another database results region on the same page with a similar statement.
Is there a way that I can use multiple SQL statements on the same page without doing the above - as it seems really inefficient.
Thanks in advance