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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic From Clause

Status
Not open for further replies.

EricBarre

Programmer
Sep 23, 2003
3
US
Hi,

I am trying to dynamically select the db.table used in my query based on the value of a parameter. Something like:
Select *
From
If {?RptPath} = 'GL' Then
gl_table
else
msa_table
end If

Any suggestions on how this would be achievable?

Thanks,
Eric
 
you could build the sql statement dynamically and then execute in a stored procedure


Regards
Chuck LaRue
ADRS Computer Services
 
I thought about passing the paramters to the SP and execute the appropriate query there, but I would rather not have to if I can. It would be nice to stay within Crystal for such a trivial thing.

Thanks,
Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top