简体   繁体   中英

Make MERGE statement in BODS

I have SAP BODS as ETL tool running towards Oracle Exadata. I would like to produce a merge into statement from BODS that include a where clause, limiting the columns that will be updated when found a match.

The merge statement I have today looks like this:

MERGE INTO TargetTable s 
USING
(SELECT  columns
FROM "sourceTable"
) n 
ON ((s.Column= n.Column) WHEN MATCHED THEN
UPDATE SET s."Column" = n.Column
-----MISSING where clause ------
WHEN NOT MATCHED THEN
INSERT  /*+ APPEND */ (s.columns)
VALUES (n.Columns);

Use DS target Auto Correct load. There are several options to play with there and if you

allow merge sets to 'Yes'

You will have the above query generated. But please take care as proper keys should be set in target for this to happen.

Cheerz. Shaz

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM