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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resquencing Numerically Ordered Data

Status
Not open for further replies.

nstouffer

Programmer
Jan 11, 2002
52
US
Here's a trickier one I need help with:

I have a data set like:

Co JE Code
20 1010
20 1011
20 1012
21 1010
21 1011
21 1012
23 1010
23 1011

It needs to be resequenced like this:

Co JE Code
01 1010
01 1011
01 1012
01 1013
01 1014
01 1015
23 1010
23 1011

With the remaining adjacent data in the rows to be kept
intact....

Any ideas?

thanks again in advance
 
If you have only the five rows you indicate with CO values of 20 and 21, the following update will work.


update your_table set co=1, jecode = jecode + 3*(co-20)
where co in (20,21)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top