Subject Re: [firebird-support] Re: Dynamic name in a stored procedure
Author Martijn Tonies
Randall,

> > sorry, I meant variables instead of parameters, but you are not allowed
> > to use both like you are trying to.
> >
> > Regards
> > Salvatore
> >
>
> Yes, clearly I figured that out when I tried to compile. The real
> question is - how does one do this? How do I call a single stored
> procedure from the client, which returns different results (WHERE
> criteria) to the client?
>
> I am trying to keep the business logic fully contained in the server.
> Yes it would be a breeze to place some logic on the Delphi client end
> that calls one of two different SELECT statements - but that misses
> the objective.

EXECUTE STATEMENT is suitable for that, no problem.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com