Subject | Re: [firebird-support] Setting value from stored proc in trigger |
---|---|
Author | Martijn Tonies |
Post date | 2007-01-18T09:17:43Z |
Hello Daniel,
execute procedure multiply (10, 20) returning_values :new.field;
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I'm looking for the correct syntax to set a field in a trigger to amore
> value retrieved from a
> stored procedure.
>
> Here's a simplified examle (I'm not doing multiplication, but some other,
> complex calculations):A procedure is not a function.
>
> create procedure multiply(a integer, b integer) returns(c integer) as
> begin
> c = :a*:b;
> end^
>
> create trigger test_trigger for test active before insert as
> begin
> new.field = multiply(10,20); /* I'm looking for the correct syntax
> to do this */
> end^
execute procedure multiply (10, 20) returning_values :new.field;
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com