Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kalyan.cse05
Yak Posting Veteran
74 Posts |
Posted - 2013-07-26 : 07:30:38
|
i have a table with below data:shop name display_seqaaa 9aaa 10bbb 8bbb 9i need to rearrange the display seq from 1. so the table data will be like:shop name display_seqaaa 1aaa 2bbb 1bbb 2Could someone please help me with the query??Thanks in advancekalyan Ashis Dey |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2013-07-26 : 07:44:49
|
update dtset display_seq = new_seqfrom(select row_number() over (partition by [shop name] order by display_seq asc) new_seq,* from YourTableName)dt Too old to Rock'n'Roll too young to die. |
|
|
kalyan.cse05
Yak Posting Veteran
74 Posts |
Posted - 2013-07-26 : 08:51:05
|
Thanks a lot..it works..:)kalyan Ashis Dey |
|
|
|
|
|