Subject | inteligent procedure for generators |
---|---|
Author | ricardo_brasuca |
Post date | 2004-04-16T04:22:30Z |
Hi there!
I am new in the databse world.
Usually i see in the documentation of interbase examples where a
procedure getXXXCod call a one generator.
How i can do if i want create a procedure that receive a parameter
that will be passed to gen_id?
some thing like this, i think:
set term !! ;
CREATE PROCEDURE getNextCode(genName char(20))
returns result int;
AS
begin
result= GEN_ID(genName, 1);
exit;
END;
SET TERM ; !!
So, i'm so sorry, because i tryed do that it didn't work.
Help me please, because i am developing a software where a have
about a hundred of generetors.
Thanks! #8^p
Ricardo Nakashima
I am new in the databse world.
Usually i see in the documentation of interbase examples where a
procedure getXXXCod call a one generator.
How i can do if i want create a procedure that receive a parameter
that will be passed to gen_id?
some thing like this, i think:
set term !! ;
CREATE PROCEDURE getNextCode(genName char(20))
returns result int;
AS
begin
result= GEN_ID(genName, 1);
exit;
END;
SET TERM ; !!
So, i'm so sorry, because i tryed do that it didn't work.
Help me please, because i am developing a software where a have
about a hundred of generetors.
Thanks! #8^p
Ricardo Nakashima