Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Please help with Inserting ID into table from another table in Oracle 9.2
MrHelpMe wrote:
>> Why two procedures and not one? >> -- >> Daniel A. Morgan >> University of Washington >> damor..._at_x.washington.edu >> (replace x with u to respond) >> Puget Sound Oracle Users Groupwww.psoug.org- Hide quoted text - >> >> - Show quoted text -
What you are asking is unclear but look at the Merge Statement if the choice in a single table is insert/update. Look at the INSERT FIRST, INSERT ALL, and INSERT WHEN statements.
Also consider doing a SELECT COUNT(*) to determine if the record has already been inserted.
You can find all of these in Morgan's Library at www.psoug.org. Look up MERGE and INSERT.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Mon Apr 30 2007 - 11:09:51 CDT