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 |
|
schilgod
Starting Member
1 Post |
Posted - 2010-05-19 : 15:20:36
|
| Hi,i have a table as belownew_id old_id2001 20042004 20082008 2010as you can see the i have to get old_id using new_id, and check if new_id has any value as the previous old_id and get its old_id....How can i write a sql query for this? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-05-19 : 18:23:05
|
check out recursive cte KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
prakash.mestry
Starting Member
4 Posts |
Posted - 2010-05-20 : 01:05:03
|
| can u put expected output?Thanksprakash.mestry@hotmail.com |
 |
|
|
|
|
|