Re: SP and dynamic where clause.
Posted in 1996
M Ferris wrote: > I have a report(s) that a user calls with 4 retrieval parameters. The user > can select the retrieval parameters in any fashion or combination. I have 4, > and by my reckoning, I have 15 unique combinations. This means I have 15 > different where clauses. Is there any way to pass the entire where clause > (not just the variable) into a stored proc? > > Thanks, Matt Ferris No you can't. But with only 15 combinations it would be relatively easy to write 15 SP's one for each query and have a control SP that checked the four parameters and decided which one to call. Cheers - Jim -- ------------------------------------------------------------------------ Jim Gordon DHL Airways Inc. jgordon@us.dhl.com ------------------------------------------------------------------------ My opinions are my own. They may vary with time but they remain mine!