Half-solved:
We have discovered that a "returning" clause can be added after the "values"
clause in the INSERT statement to return a rowid immediately after a row is
inserted.
However, it would still be helpful to have a procedure or Oracle OCI call to
Parse a sql statement. In case anybody can help out...
Thanks,
Sam.
> -----Original Message-----
> From: Sam Bootsma
> Sent: January 31, 2001 1:33 PM
> To: '[EMAIL PROTECTED]'
> Subject: Does Oracle Allow Retrieval of Parsed Insert Statement??
>
> We have a situation where we insert rows into a table, without having
> knowledge of the primary key. One of our developers needs to determine
> the rowid of such a row (primary key unknown) immediately after the row is
> inserted into the table.
>
> Does anybody know if the rowid can be retrieved (or somehow returned)
> immediately after the row is inserted (without requerying the table)?
>
> The rowid can also be determined by parsing the insert statement,
> retrieving the primary key, then querying the table for the rowid of the
> row. Does anybody know if Oracle has an OCI call that returns components
> of a parsed SQL INSERT statement. Or does anybody have a script or
> procedure that parses a SQL INSERT statement?
>
> Thanks for any help.
>
> Sam.
>
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Sam Bootsma
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).