Subject | Re: [ib-support] Stored Procedure question |
---|---|
Author | Nicorici Marcel |
Post date | 2003-01-23T08:07:35Z |
--- "chris_michalec <Cmich22@...>"
<Cmich22@...> wrote:
You can try this( in firebird 1.5)
Create Procedure Delete_From_Table( TABLE_NAME
Char(20))
AS
declare variable SQL_TXT varchar(300);
begin
SQL_TXT = 'Delete from ' || :TABLE_NAME;
execute varchar SQL_TXT;
END
REMEMBER YOU CANNOT RETURN VALUES, SO YOU CANNOT
EXECUTE SELECT STATEMENTS!
Ciao
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
<Cmich22@...> wrote:
> This may be easy, but I haven't found anything inHi,
> the documentation
> to point me in the right direction.
>
> How could I pass a tablename in through a stored
> procedure?
>
> Ie
>
> Create Procedure Delete_From_Table( ATableName
> Char(20)) as
> begin
> Delete from :ATableName;
> end;
You can try this( in firebird 1.5)
Create Procedure Delete_From_Table( TABLE_NAME
Char(20))
AS
declare variable SQL_TXT varchar(300);
begin
SQL_TXT = 'Delete from ' || :TABLE_NAME;
execute varchar SQL_TXT;
END
REMEMBER YOU CANNOT RETURN VALUES, SO YOU CANNOT
EXECUTE SELECT STATEMENTS!
Ciao
>__________________________________________________
> I know the above doesn't work because that is what I
> tried, but I
> think you get the idea of what I am trying to do.
>
> Thanks,
>
> Chris Michalec
>
>
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com