Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mulitple SQL Statements

Status
Not open for further replies.

pancake

Programmer
Aug 21, 2001
88
GB
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top