Re: Getting value of serial column after insert inside stored procedure, help!
Posted in 1995
The solution to the original problem is to use "IF name IS NULL' in the stored procedure. The SP correctly uses DBINFO() to get the serial number value. I'm not sure which versions of SPL support it; it is definitely in 7.1x, I believe it is in 6.0x, and it may be in more recent 5.0x versions, but more likely is not (it does not seem to be part of 5.03.UC1). Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> }From: rmcall@on-ramp.ior.com (Rob McAllister) }Date: Thu, 23 Nov 1995 02:00:09 GMT }X-Informix-List-Id: <news.19162> } }What version of ONLINE are you using? If it is 5.x, there is no way }to get this in an SPL, except to re-read the record just added by an }alternate unique key. } }vsp@triada.triad.com (Vaishali Padhye) wrote: } }>I am inserting a record in a stored procedure for a table having }>a serial column, now I want to find out the value the serial }>column got assigned and return it. } }>I know it gets assigned in sqlca.sqlerrd[1], but thats useful in }>4gl or esql program, can this structure be accessed in a stored }>procedure? Any pointers will be a great help. Thanks! } }>Vaishali Padhye }>Triad Systems Corp.