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 |
3deepak
Starting Member
2 Posts |
Posted - 2008-07-07 : 23:42:18
|
hi all,Let us consider I have a table, tbl1, like thisprevID prevName NextID NextName Value1 name1 2 name1 1001 name1 2 name2 2002 name1 3 name1 3002 name2 4 name2 4003 name1 4 name2 5004 name1 2 name2 6004 name2 4 name1 700 Now, I want to extract Value from this table.If I give the prevID and prevName, then my query should extract1) all the Value for the prevID & prevName combination2) all the Value for the NextID and NextName combination available till the cycle completes.For eg, suppose if i give prevID =1 and prevName = 'name1' then the Values extracted should be in the orderValue100300500700600400200to give another eg, suppose if i give prevID =3 and prevName = 'name1' then the Values extracted should be in the orderValue500700600400I hope you understood the logic.. Please help me on the query for this.. I tried hard but I'm not able to find it...Thanks... |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-08 : 06:40:25
|
have a look at this:-http://support.microsoft.com/kb/248915 |
 |
|
3deepak
Starting Member
2 Posts |
Posted - 2008-07-08 : 07:06:15
|
Thank you very much... this is what I'm searching about!! :) |
 |
|
|
|
|