Is there any possible way we can use join in merge statement?
MERGE INTO TABLE1 T
USING TABLE2
ON .....
WHEN MATCHED THEN .....
WHEN NOT MATCHED THEN INSERT (X,Y,Z1) VALUES (X,Y,Z1);
X and Y belong TABLE2 and no problem with merging, but I also want to insert Z1 from another TABLE3, when merging into TABLE1.
I am trying to join TABLE3 but it's not allowed in Merging syntax.
Is there any way to do so?