Subject | Re: [firebird-support] Stored Procedure - Using variables |
---|---|
Author | Martijn Tonies |
Post date | 2004-03-22T06:17:26Z |
Hi Marcello,
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> I'm trying use the stored procedure above but it is not acceptingOut of curiosity - where did you read this syntax?
> GEN_PEDI as a column.
> There is any reserved word that I can use for this, like var.GEN_PEDI?
> How can I contorn this issue?
>
>
> ALTER PROCEDURE TMPEDI_TO_PEDI (PEDI INTEGER)
> RETURNS (GEN_PEDI INTEGER)
> AS
> BEGIN
> GEN_PEDI = GEN_ID(GEN_PEDI_ID, 1);
>
> INSERT INTO PEDI
> SELECT *GEN_PEDI*, CLIE, DEMI, VPRO, VSER, 0, 0, 0, 0, LOGG
> FROM TMPEDI WHERE PEDI = :PEDI;
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> INSERT INTO PEDIITEM
> SELECT *GEN_PEDI*, PROD, BSER, QSAI, VUNI
> FROM TMPEDIITEM WHERE PEDI = :PEDI;
>
> DELETE FROM TMPEDI WHERE PEDI = :PEDI;
> DELETE FROM TMPEDIITEM WHERE PEDI = :PEDI;
>
> SUSPEND;
> END