|
-
resequence...
Let me elaborate on this a little, I guess I did not make myself clear enough:
Resequencing applies to plant/item rows only. That is the key to the table. So this would be the original example:
plant item supplier part rank
001 item1 s001 1234 6
001 item1 s002 1111 7
001 item1 s004 2222 2
001 item1 s005 4445 5
there could be another example like this:
plant item supplier part rank
001 item2 s001 1234 5
001 item2 s011 6666 3
001 item2 s004 2222 1
What I am asking is given a plant/item, how can I resequence the 'rank' column with an update statement. Looks like this can't be done. If I do somethingl like:
update tablexxx
set rank = rank + 1
where plant = '001'
and item = 'item2'
Then I would get the current value plus 1. That is not good because my goal is to have the rows look like this:
plant item supplier part rank
001 item2 s001 1234 3
001 item2 s011 6666 2
001 item2 s004 2222 1
That is why I was asking here if anyone knows of a way to do this. I was just trying to keep from having to write a stored proc for this...
joe
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|