I have an SQL table that looks like:
TABLE QUEUE ID DATA POSITION
Field POSITION holds the potition of the record relative to a Queue. So, it can be:
0
not in any position (not queued).1
first in the queue (next in line).> 1
the position in the queue.
I need a (MS) SQL query that will move the queue up one position.
Before the query:
- 09, Record data 09, 0
- 10, Record data 10, 1
- 11, Record data 11, 2
- 12, Record data 12, 3
After the query:
- 09, Record data 09, 0
- 10, Record data 10, 0
- 11, Record data 11, 1
- 12, Record data 12, 2
How can I do it in a single query?