Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2009
    Posts
    12

    Unanswered: merge statement is not working

    when i execute below staying statememt, this message appears. maybe merge is not supported in Oracle9i Release 9.2.0.5.0:

    meesage: 13:32:20 [MERGE - 0 row(s), 0.000 secs] [Error Code: 907, SQL State: 42000] ORA-00907: Rechte Klammer fehlt

    Code:
    merge into TIME.KOM_GEH@link_to_arttest t
    using (select * from TIME.KOM_GEH) timesheet
    on (
    t.RN=timesheet.RN
    t.KOMMEN=timesheet.KOMMEN
    t.GEHEN=timesheet.GEHEN
    t.PAUSE_H=timesheet.PAUSE
    )
    when matched then
    0=0
    when not machted then
    insert () values (timesheet.RN, timesheet.KOMMEN, timesheet.GEHEN, timesheet.PAUSE);

    thank you.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >maybe merge is not supported in Oracle9i Release 9.2.0.5.0:

    when all else fails Read The Fine Manual

    SQL Statements: DROP SEQUENCE to ROLLBACK, 15 of 19
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    The error indicates that the Right parenthesis is missing. instead of typing it in, cut and paste the actual merge command.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  4. #4
    Join Date
    Jan 2012
    Posts
    84
    Merge is supported starting from Oracle 10.
    Anyway, your statement has syntax errors
    Code:
    merge into TIME.KOM_GEH@link_to_arttest t
    using (select * from TIME.KOM_GEH) timesheet
    on (
    t.RN=timesheet.RN
    AND
    t.KOMMEN=timesheet.KOMMEN
    AND
    t.GEHEN=timesheet.GEHEN
    AND
    t.PAUSE_H=timesheet.PAUSE
    )
    when not machted then
    insert (
      -- column list of t is required here, separate columns with comma
      column1, col2, col3, col4
    ) values (timesheet.RN, timesheet.KOMMEN, timesheet.GEHEN, timesheet.PAUSE);

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Merge is supported starting from Oracle 10.
    See URL posted above which indicates otherwise
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •