Home » SQL & PL/SQL » SQL & PL/SQL » Invalid Identifier - Oracle Error
Invalid Identifier - Oracle Error [message #224205] Tue, 13 March 2007 07:02 Go to next message
mymot
Messages: 225
Registered: July 2005
Senior Member
Hi,

I am receiving below oracle for running SQL on Sun unix


INSERT INTO TMP_ID_NO
( ID, NAME, ADDRESS,DEPT)
SELECT T2.PID  PID 
       ,T1.PNAME  PNAME
        ,T2.PADD  PADD
        ,T1.PDEPT PDEPT
FROM TEST T1, TEST T2
WHERE 
T1.ID = T2.PID
 
ORA-00904: "T1"."PDEPT": invalid identifier 



I have checked schema, and all the columns are there,
there is no problem with the column names,

Executed sql on SQL prompt successfully but when included in UNIX Shell Script to call .sql file, i am getting above error while running job on unix.

do not know where is problem?

Thanks
Re: Invalid Identifier - Oracle Error [message #224231 is a reply to message #224205] Tue, 13 March 2007 07:59 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you (through the job) connect to the same schema as when you were in SQL*Plus?
Re: Invalid Identifier - Oracle Error [message #224272 is a reply to message #224231] Tue, 13 March 2007 12:28 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
show user
select * from v$instance;
Re: Invalid Identifier - Oracle Error [message #224498 is a reply to message #224205] Wed, 14 March 2007 07:58 Go to previous message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
Also: Are you executing as the same user from within the UNIX script. Could be privileges
Previous Topic: Does Oracle determine the index to use in a query based on whether update statistics has been run?
Next Topic: procedure accept insert into query as parameter
Goto Forum:
  


Current Time: Wed Dec 07 07:03:13 CST 2016

Total time taken to generate the page: 0.09456 seconds