Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Swap row sequence numbers?

Swap row sequence numbers?

From: Craig Buchanan <craig.buchanan_at_cogniza.com>
Date: Thu, 25 Oct 2001 13:27:03 GMT
Message-ID: <HqUB7.1599$bb1.54308@newsfeed.slurp.net>


Our web application displays rows from a table in a HTML table, ordered by a sequence number.

I would like to add a feature that would allow a user to move a row up or down relative to its neighbors, perhaps by clicking an up and down arrow (as opposed to forcing them to type a new sequence number).

Is there a SQL-92 statement, that will swap a row's sequence number with another's when all it knows is the row being clicked and the direction of movement? Something like:

UPDATE my_table
SET sequence = (hard part here)
WHERE row_key_1 = something
AND row_key_2 = somethingelse

Thanks,

Craig Buchanan



Crystal Decisions USENET forums at http://www.cogniza.com/support/forums Received on Thu Oct 25 2001 - 08:27:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US