468,720 Members | 1,872 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,720 developers. It's quick & easy.

Hard Upgrading !

Hi,

Need help to make a script in t-sql for mssql version 2000.


I have a table with fields; cusid, txtdes, ordinal
Data example :
5001 aaaa null
5001 eeee null
5001 oooo null
5003 bbbb null
5003 pppp null
5006 cccc null

I need upgrade the 'ordinal' field like this :
5001 aaaa 1
5001 eeee 2
5001 oooo 3
5003 bbbb 1
5003 pppp 2
5006 cccc 1
5009 kkkk 1

the behavior`s upgrade must star in one, increment in one if 'cusid' is the same and restart if 'cusid' change.


Thanks !!
Aug 29 '05 #1
0 1351

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by S. Crespel | last post: by
1 post views Thread by bartolomesintes | last post: by
6 posts views Thread by Michael Foord | last post: by
reply views Thread by Jonathan Hilgeman | last post: by
2 posts views Thread by wellington fan | last post: by
5 posts views Thread by Mike Owen | last post: by
11 posts views Thread by Aidan Tobin | last post: by
1 post views Thread by progTiger | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.