Subject How do you dynamically build a SQL Statement in a Stored Procedure?
Author Larry Hengen
I am trying to build a resultset from a list of ID Values. I would
like to do this in a stored procedure rather than in Delphi code
because there are lots of queries to build the resultset, so it should
be more efficient to do it in the database.

1) How do I pass a stored procedure a list of ID values?
2) How cam I dynamically build a statement like Select X from Table
where ID value in ( Value list )?