Ray, Oracle uses a structure called a Sequence number to generate the equivalent of the auto number in Access. An Oracle sequence number always returns a unique number when invoked. For example if the Sequence number is CustomerID then the following statement will generate a unique key: INSERT into CUSTOMER (Customer_Key, Customer_Name) values (CustomerID.Nextval, 'John Smith');
After the insert call you can issue the following select statement which will return the last value YOU obtained from the Sequence: SELECT CustomerID.CurrentVal FROM DUAL; (DUAL is a dummy table Oracle uses to permit the return of this kind of strange select value). ----- Original Message ----- From: "Ray Bujarski" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, June 26, 2002 3:55 PM Subject: getting auto id > I am using oracle and am running into an issue. I have a relation that I > need to get the id value for a record that was just inserted. I am using a > trigger to insert the sequence value into ID field of the parent table. > However, I need to use this same ID for a relation. Does anyone know how I > can return this value back to the cold fusion application server for use in > my relation insertion? > > Ray Bujarski > 858-845-7669 > 858-636-9900 pgr > [EMAIL PROTECTED] > > ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

