Home » SQL & PL/SQL » SQL & PL/SQL » Getting error ORA-02012: missing USING keyword
Getting error ORA-02012: missing USING keyword [message #228547] Tue, 03 April 2007 06:07 Go to next message
tapaskmanna
Messages: 98
Registered: January 2007
Location: Cyprus,Nicosia
Member
Merge Into tap_emp as te USING s_emp se On (te.id=se.id)
When Matched Then
Update Set
te.last_name=se.last_name,
te.first_name=se.first_name,
te.userid=se.userid,
te.start_date=se.start_date,
te.comments=se.comments,
te.manager_id=se.manager_id,
te.title=se.title,
te.salary=se.salary,
te.commission_pct=se.commission_pct
When Not Matched Then
Insert(te.id,te.last_name,
te.first_name,
te.userid,
te.start_date,
te.comments,
te.manager_id,
te.title,
te.salary,
te.commission_pct)
Values(25,'Schwartz','Sylvie','sschwart','09/mar/91',null,null,10,'Stock Clerk',45,1100.00,null);
Re: Getting error ORA-02012: missing USING keyword [message #228594 is a reply to message #228547] Tue, 03 April 2007 07:57 Go to previous messageGo to next message
Michel Cadot
Messages: 64108
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Remove "as" before the table alias.

Regards
Michel
Re: Getting error ORA-02012: missing USING keyword [message #228723 is a reply to message #228547] Tue, 03 April 2007 22:34 Go to previous messageGo to next message
muzahid
Messages: 281
Registered: September 2004
Location: Dhaka, Bangladesh
Senior Member
tapaskmanna wrote on Tue, 03 April 2007 06:07
Merge Into tap_emp as te USING s_emp se On (te.id=se.id)
When Matched Then
Update Set
te.last_name=se.last_name,
te.first_name=se.first_name,
te.userid=se.userid,
te.start_date=se.start_date,
te.comments=se.comments,
te.manager_id=se.manager_id,
te.title=se.title,
te.salary=se.salary,
te.commission_pct=se.commission_pct
When Not Matched Then
Insert(te.id,te.last_name,
te.first_name,
te.userid,
te.start_date,
te.comments,
te.manager_id,
te.title,
te.salary,
te.commission_pct)
Values(25,'Schwartz','Sylvie','sschwart','09/mar/91',null,null,10,'Stock Clerk',45,1100.00,null);


u inserted 12 values in values but u have only 10 column so check it.
Re: Getting error ORA-02012: missing USING keyword [message #228746 is a reply to message #228594] Wed, 04 April 2007 01:11 Go to previous message
tapaskmanna
Messages: 98
Registered: January 2007
Location: Cyprus,Nicosia
Member
Thanxs
Previous Topic: sql swap
Next Topic: how to get a column value from database table
Goto Forum:
  


Current Time: Mon Dec 05 04:52:12 CST 2016

Total time taken to generate the page: 0.05481 seconds