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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 recursive query in sql2000

Author  Topic 

fparker
Starting Member

27 Posts

Posted - 2011-08-01 : 12:37:20
I did a search for this but so far all the results are for cte which isn't avaialble.

I need a recursive query for a parent/child relationship as follows.

orders can be copied from previous orders. I would like to enter any order number and get the entire chain both ways for an order that has been repeatedly copied.

tia on any links to this type of recursive query in sql2000


--
f

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2011-08-01 : 12:47:48
Any particular table format? DDL, DML would be very helpful...

Corey

I Has Returned!!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-01 : 13:37:58
you can do it in sql 2000 by means of a WHILE loop.

see

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76414

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

fparker
Starting Member

27 Posts

Posted - 2011-08-01 : 17:12:51
Thanks, that should help.


--
f
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-02 : 01:06:15
wc

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -