Subject | Re: Stored procedure to work with specified table/fields? |
---|---|
Author | sgharp |
Post date | 2004-06-19T01:00:48Z |
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@m...>
wrote:
Steve
wrote:
> > I'd like to write a stored procedure that is generic andindependent
> > of hard coded table and field names. For instance:well I
> >
> > 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
> assume?No. Please enlighten me.
> Alan
Steve