Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Recursion??? Expand / Collapse
Posted Wednesday, January 30, 2008 1:03 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, June 25, 2008 11:47 AM
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 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....

Post #449641
Posted Thursday, January 31, 2008 5:29 AM



Group: General Forum Members
Last Login: Today @ 3:06 AM
Points: 15,899, Visits: 30,181
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
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #449881
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse