If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > merge statement is not working

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-29-12, 07:34
mr-sansibar mr-sansibar is offline
Registered User
 
Join Date: Jun 2009
Posts: 10
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.
Reply With Quote
  #2 (permalink)  
Old 06-29-12, 09:56
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 7,092
>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.
Reply With Quote
  #3 (permalink)  
Old 06-29-12, 10:02
beilstwh beilstwh is offline
Lead Application Develope
 
Join Date: Jun 2004
Location: Liverpool, NY USA
Posts: 2,343
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.
Reply With Quote
  #4 (permalink)  
Old 06-29-12, 10:19
kordirko kordirko is offline
Registered User
 
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);
Reply With Quote
  #5 (permalink)  
Old 06-29-12, 10:22
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 7,092
>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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On