Subject | Re: [firebird-support] stored procedured with insert ... returning |
---|---|
Author | livius |
Post date | 2018-06-10T06:43:34Z |
Hi,
returning ... INTO ..
regards,
Karol BIeniaszewski
Sent: Sunday, June 10, 2018 1:14 AM
Subject: [firebird-support] stored procedured with insert ...
returning
When I try to create the following stored procedure I get sql error code = -206 Column unknown EMPID
SET TERM ! ;
CREATE OR ALTER PROCEDURE TEST (
ATITLE
DOM_VARCHARTINY,
AFIRST_NAME DOM_VARCHARMEDIUM,
AINITIALS
DOM_VARCHARTINY,
ASURNAME DOM_VARCHARMEDIUM,
AEMAIL
DOM_VARCHARLARGE,
APHONE
DOM_VARCHARTINY)
AS
begin
INSERT INTO
Employee (title, first_name, initials,
surname,
email, phone_ext)
VALUES(:ATitle,
:AFirst_Name, :AInitials, :ASurname, :AEmail,
:APhone)
RETURNING
:EMPID;
end !
SET TERM ; !
The table does have a EMPID column defined and if I type the insert statement and execute it, it does work.