SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Recursion???


Recursion???

Author
Message
gowdara.anu
gowdara.anu
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 11
I need to write a stored procedure in SQL 2000.
I have a tables fld and fld_term, relashionship is fld.id = fld_term.id
fld is a calculation name table and fld_term is a the actual calculation table. A calculation can call other calculation and so forth.
For example
fld table data:
ID Calc_name
12219 AT_BookValue
9952 AT_BookValue1
16 UPriceFactorHLD
23 QtyUnitsL/S HLD
8213 HLD_BookVal2

fld_term (This table stores actual calculation and if that calc callc any other calc)
ID u
12219 9952
9952 23
9952 16
23 15

So what i want is if i pass AT_BookValue to my stored procedure it should bring all the calcs that are referenced inside
12219 is referencing 9952, 16, 23, 15....

Thanks,
Anu.
Grant Fritchey
Grant Fritchey
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39770 Visits: 32641
You should post this question in the 2000 forum because you may start getting 2005 solutions to the problem that will not work in 2000. For example, I think I could make this work with a Common Table Expression, but you won't be able to run that in your SQL Server 2000 system.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search