I always get the primary key, usually from a sequence, prior to doing the
insert from CF. That way, it's available for the rest of the code. Nothing,
except maybe an error, is going to return from the insert statement.


So I create a sequence and do SEQ_NAME.NEXTVAL to get it.


Duncan Hays

-----Original Message-----
From: Stacy Young [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 04, 2003 10:35 AM
To: CF-Talk
Subject: Oracle SQL Question

If I've got a pre-insert trigger that puts in the row primary key on
insert, can I return that ID in the same query? (not using a stored proc
and is not an option) - like in MSSQL u can do multi-sql statements in
one cfquery.

Thanks!

Stace

AVIS IMPORTANT:
-------------------------------
Les informations contenues dans le present document et ses pieces jointes
sont strictement confidentielles et reservees a l'usage de la (des)
personne(s) a qui il est adresse. Si vous n'etes pas le destinataire, soyez
avise que toute divulgation, distribution, copie, ou autre utilisation de
ces informations est strictement prohibee. Si vous avez recu ce document par
erreur, veuillez s'il vous plait communiquer immediatement avec l'expediteur
et detruire ce document sans en faire de copie sous quelque forme.

WARNING:
-------------------------------
The information contained in this document and attachments is confidential
and intended only for the person(s) named above. If you are not the intended
recipient you are hereby notified that any disclosure, copying,
distribution, or any other use of the information is strictly prohibited. If
you have received this document by mistake, please notify the sender
immediately and destroy this document and attachments without making any
copy of any kind.
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to