Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> additional condition of update in merge

additional condition of update in merge

From: cschang <cschang_at_maxinter.net>
Date: Wed, 09 Mar 2005 21:32:57 -0500
Message-ID: <112vcf9dn3tff10@corp.supernews.com>


I tried to learn the merge, so i tried this in a procedure however, it gave me an error
  MERGE INTO ORDER_STATUS_NOTIFICATION o1 USING ( SELECT COUNT(*) v_count

      FROM ORDER_STATUS_NOTIFICATION
	  WHERE CHECKOUT_TXN_ID = strCheckoutTxnID ) o2
  ON ( o2.v_count > 0)
  WHEN MATCHED THEN
UPDATE
	SET
		EVENT_TYPE             = 'FAILED',
		DATE_OF_EVENT          = SYSDATE
		
       WHERE EVENT_TYPE  <> 'FAILED' <-- Err: ORA-00905, Missing Keyword
	WHEN NOT MATCHED THEN
	 INSERT

(
CHECKOUT_TXN_ID, EVENT_TYPE ) VALUES
(
strCheckoutTxnID, 'FAILED' );

Does that mean I can not add additional where condition for the update section? I was running this on 9.2 version.

C Chang Received on Wed Mar 09 2005 - 20:32:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US