MERGE INTO tdest d USING tsrc s
ON (s.srckey = d.destkey)
WHEN MATCHED THEN
UPDATE SET d.destdata = d.destdata + s.srcdata
WHEN NOT MATCHED THEN
INSERT (destkey,destdata) VALUES (srckey,srcdata)
Regards
John Fak
Oracle DBA
_____________________
Accenture Workforce Solutions
mobile: +44 (0)778 655 1214
landline: +44 (0)207 844 6981
mailto:john.[Email address protected]
-----Original Message-----
From: Seefelt Beth [mailto:oracledba-ezmlmshield-x50455096.[Email address protected]
Sent: 18 August 2004 17:05
To: LazyDBA Discussion
Subject: RE: INSERT-UPDATE
MERGE
I don't think it was in 8.1.7. Only 9 and up.
-----Original Message-----
From: cisanchez [mailto:oracledba-ezmlmshield-x10339424.[Email address protected]
Sent: Wednesday, August 18, 2004 12:01 PM
To: LazyDBA Discussion
Subject: INSERT-UPDATE
I know exist an insert-update sentence which in a unique statement do an
insert if the record is not found and updates the record if found.
Do you remember this statement?, if so can you send me please and example
and if it is supported in Oracle 81.7
Thanks for your help.
Saludos
Christian I. Sánchez Noriega
Equipo BASIS SAP
Belcorp - TI
Mail: [Email address protected]
Fono: 2113300 (1629)
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html
The information contained in this e-mail message is confidential, may
be legally privileged, and is intended for use only by the individual(s)
named above. If you are not the intended recipient of this message, you
must not copy, forward, disclose or otherwise use it, or any part of
it, in any way whatsoever. If you have received this message in error,
please notify the sender immediately by return e-mail and delete the
message and any attachments from your system. Thank you
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
Oracle LazyDBA home page