There exists a function "dbinfo" in spl (and in sql).
To resolve your problem, do this:
...
LET mySerial = dbinfo('sqlca.sqlerrd1');
...
> Hi All!
>
> My problem is:
> How can I get (in STORED PROCEDURE) the value of a SERIAL column of a
> newly inserted row?
>
> In 4GL, I can use SQLCA.SQLERRD[2], but it seems not to work in SPL (I
> get systax error when i try to CREATE procedure with SQLCA.SQLERRD.
> Also, in data types section of SPL Reference I found no mention of
> record syntax which implies to me that there are no records in SPL).
>
> As SQLCA record contains a set of valuable information, it seems very
> strange to me that I can]t obtain this information in SPL. Is there
> another place to look for this information? If no, is there another
> possiblity to get the last inserted SERIAL value. Of course, I can't
> just SELECT MAX(...) in multiuser environment. In my database, almost
> each table has SERIAL primary key and when I tried to move some logic
> from 4GL code to Stored Procedures, i was stopped by the problem.
>
> TIA
>
> Jacek
--
Michael Degtyarev, System analyst
-----------------------------------------------------------------
Phone: (373 2) 212096, 243566 45 Banulescu-Bodoni str.,
Fax: (373 2) 240083, 213659 POB 164, Chisinau, MD-2001,
eMail: dmv@netinfo-moldova.com Republic of Moldova.