Recid in Stored Procedure
Bart Pietercil
bart.pietercil at gmail.com
Thu Sep 20 09:21:41 CDT 2007
On 20-sep-07, at 16:01, Ivan Smahin wrote:
> Hello Bart,
>
> Thursday, September 20, 2007, 4:19:05 PM, you wrote:
>
>> Hi List,
>
>> can I inside a stored procedure say:
>
>> declare lastid long
>> lastid = insert into aTable (x,y,z,...)
>
>> Will insert return the inserted record recid ?
>
> Currently no. Please fill up the feature request.
Done
>
>> Or how else can I obtain the last inserted recid (always inside a
>> Stored procedure)
>
> Seems to be impossible now.
Do you mean that in the next line of this sp
create or replace procedure spBuildUserTypes()
begin
insert into tbl_typelists(created_by,typelistname) values
('spBuildUserTypes','usertypes')
end
I cannot put a select statement to obtain the recid of the record
created in the previous line ?
or maybe I should modify our after insert trigger to have a line
set @last_recid = new.recid ?
Would that work ?
>
>> PS: damn, your response keep coming quicker then I can make up
>> questions
>
> So we are very responsible persons :)
Person from Kherson, what can I say...
Bart
More information about the Valentina
mailing list