Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Merge involving a collection
Hallo,
I need some help for the syntax of a MERGE instruction with a
COLLECTION e a source for data.
I have problems because I'm not so used with MERGE and CAST
instructions.
In my code CHECKS_TAB is the collection (indexed by Varchar2), and I'm trying something like this
MERGE INTO UNIT_CHECKS
USING TABLE (CAST(CHECKS_TAB as CHECKS_TAB_TYPE)) CHECKS_TAB
ON (
UNIT_NO = CHECKS_TAB.UNIT_NO AND
START_DT = CHECKS_TAB.START_DT AND
INTERVAL_NO = CHECKS_TAB.INTERVAL_NO
)
WHEN MATCHED THEN UPDATE SET
CHK_PC_PREQ = CHECKS_TAB.CHK_PC_PREQ
I'm trying this on Oracle 9.2, to be compatible with 10g
Thanks! Received on Fri Sep 21 2007 - 06:54:53 CDT
![]() |
![]() |