Merge Into using 'With UR'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kelleram
    New Member
    • Sep 2008
    • 12

    Merge Into using 'With UR'

    Has anyone been able to successfully create a Merge Into Statement using 'With UR' as part of the select? I have the following statement:

    MERGE INTO TABLE C USING(SELECT ...) AS S
    ON (S.SOURCETABLEN AME=C.SOURCETAB LENAME AND S.CHANGE_NUMBER =C.CHANGENUMBER )
    WHEN NOT MATCHED THEN INSERT
    (COLUMN1,COLUMN 2,COLUMN3, ETC...)
    VALUES (S.SOURCETABLEN AME,S.CHANGE_NU MBER)

    It works great without the 'With UR' but when using the 'With UR' I get an error.
  • pronerd
    Recognized Expert Contributor
    • Nov 2006
    • 392

    #2
    It would be a really bad think if it did work with the "WITH UR" option. What would you want to merge in un-committed data? What if the transaction was rolled back, would you still want it to be included in your merge?

    Comment

    Working...