Home » Infrastructure » Unix » error plz help me
error plz help me [message #231145] Sun, 15 April 2007 01:45 Go to next message
sathyam2627
Messages: 52
Registered: November 2006
Member
hi
this is sathya when i tried to execute merge statement i am getting an error message as shown below but the column name is correct.

kindly help me

1 merge into copy_emp c
2 using emp e
3 on (c.empno=e.empno)
4 when matched then
5 update set
6 c.empno= e.empno,
7 c.ename =e.ename,
8 c.job=e.job,
9 c.mgr=e.mgr,
10 c.hiredate=e.hiredate,
11 c.sal=e.sal,
12 c.comm=e.comm,
13 c.deptno=e.deptno
14 when not matched then
15* insert values ( e.empno,e.ename,e.job,e.mgr,e.hiredate,e.sal,e.comm,e.deptno)
16 /
on (c.empno=e.empno)
*
ERROR at line 3:
ORA-00904: "C"."EMPNO": invalid identifier
Re: error plz help me [message #231147 is a reply to message #231145] Sun, 15 April 2007 02:29 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,

can you please post below output
desc copy_emp



Regards
Taj
Re: error plz help me [message #231148 is a reply to message #231147] Sun, 15 April 2007 02:32 Go to previous messageGo to next message
sathyam2627
Messages: 52
Registered: November 2006
Member
SQL> desc copy_emp
Name Null? Type
----------------------- -------- ----------------
EMPNO NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
Re: error plz help me [message #231150 is a reply to message #231147] Sun, 15 April 2007 02:45 Go to previous messageGo to next message
sathyam2627
Messages: 52
Registered: November 2006
Member
hi ,
thanks for your kind consideration

SQL> desc copy_emp
Name Null? Type
-------------------------------------- -------- --------------------------
EMPNO NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)

regards,
sathys
Re: error plz help me [message #231151 is a reply to message #231150] Sun, 15 April 2007 02:49 Go to previous message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,

1 merge into copy_emp c
2 using emp e
3 on (c.empno=e.empno)
4 when matched then
5 update set
6 c.empno= e.empno,
7 c.ename =e.ename,
8 c.job=e.job,
9 c.mgr=e.mgr,
10 c.hiredate=e.hiredate,
11 c.sal=e.sal,
12 c.comm=e.comm,
13 c.deptno=e.deptno
14 when not matched then
15* insert values ( e.empno,e.ename,e.job,e.mgr,e.hiredate,e.sal,e.comm,e.deptno)
16 /


Remove bold line in above statement.


Regards
Taj
Previous Topic: ORA-12547: TNS:lost contact
Next Topic: How to save a CSV (having non-English characters) file as XLS file
Goto Forum:
  


Current Time: Wed Dec 07 22:16:45 CST 2016

Total time taken to generate the page: 0.09477 seconds