Subject Re: [firebird-support] Table name as parameter to stored procedure ?
Author Martijn Tonies
Hi,

> HI ! I want to create a SP and send table name as parameter,but it doesn't
work .
> Is any solution,thank a lot !

I suggest you go through the history of this support list, there are
explanations
and suggestions in there. Have a good search and you'll find it.

> CREATE PROCEDURE GN_MMYYYY(pTBL VARCHAR(15))
> RETURNS (YY INTEGER,MM INTEGER) AS
> BEGIN
> FOR SELECT DISTINCT YEAR,MONTH FROM :pTBL ORDER BY
YEAR,MONTH INTO :YY,:MM
> DO BEGIN SUSPEND; END
> END;

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