Subject RE: [firebird-support] Stored procedure to work with specified table/fields?
Author Alan McDonald
> I'd like to write a stored procedure that is generic and independent
> of hard coded table and field names. For instance:
>
> create procedure spTest(sTable VarChar(255), sField VarChar(255))
> returns (pResult Integer)
> as
> Begin
> select :sField from :sTable
> where this = that
> into :pResult;
>
> suspend;
> End
>
> This barfs with a parsing error. Is there anyway to do this? I
> need to write a series of stored procedures to work against
> temporary tables that are created and dropped on the fly so the
> table names won't be known until runtime.
>
> Thanks for any suggestions,
> Steve
>

You do know about the other ways of NOT using temporary tables as well I
assume?
Alan