Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Stored Procedures with Parent/Child/Grandchild tables

Status
Not open for further replies.

slobad23

IS-IT--Management
Jun 30, 2006
90
GB
Here is what I am trying to achieve:

I want a report to run to get generic information from [PARENTTABLE] and then all information from other selected [CHILDTABLE] and [GRANDCHILDTABLE] tables.

I am doing this at the moment with a dataset that contains the child/grandchild information and using that to join to the parent table.

Quick example:

Standard SQL for returning all PARENTTABLE information.
The user says they want to include all of CHILDTABLE_X on the extract too.
The stored procedure is passed the CHILDTABLE dataset and this is linked on a standard field to the PARENTTABLE


While this is working, I want to make sure that there are no better methods for achieve this sort of dynamic functionality through stored procedures in this kind of scenario.

Any help would be appreciated and I am happy to provide further clarification on this.

Regards,

Slobad23
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top