Home » SQL & PL/SQL » SQL & PL/SQL » Sql error ORA-00904 invalid identifier
Sql error ORA-00904 invalid identifier [message #184207] Tue, 25 July 2006 13:48 Go to next message
reshmak24
Messages: 3
Registered: July 2006
Junior Member
When I run this sql on sql developer, I get the error as mentioned below:

SQL> select ben_cwb_custom_person_pkg.get_custom_segment1(90224, 98282, '', 67031,
2 To_Date('05-jul-2005','dd-mon-yyyy'), TO_DATE('01-jul-2006', 'dd-mon-yyyy'))
3 from dual
4 /
select ben_cwb_custom_person_pkg.get_custom_segment1(90224,
*
ERROR at line 1:
ORA-00904: : invalid identifier




I tried changing the format for dates with all possible things.. even tried sysdate.. but it gives the same error.. however, when I run the same sql on TOAD, it works.. Is this a configuration issue? Can you please let me know if there is anything wrong with the sql? Thanks in advance
Re: Sql error ORA-00904 invalid identifier [message #184211 is a reply to message #184207] Tue, 25 July 2006 14:22 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
are you sure you run the exact same query under the exact same user at exactly the same database?
Re: Sql error ORA-00904 invalid identifier [message #184213 is a reply to message #184207] Tue, 25 July 2006 14:26 Go to previous messageGo to next message
reshmak24
Messages: 3
Registered: July 2006
Junior Member
The difference is: it works when I login as "apps" but does not work when I login using my account. can this be the reason?

Please let me know.

Thank you for helping me...
Re: Sql error ORA-00904 invalid identifier [message #184215 is a reply to message #184213] Tue, 25 July 2006 14:29 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
your user does not know of the ben_cwb_custom_person_pkg package.
Either create a synonym or prefix it with the owner's name. Then make sure you have execute privilege on it.

hth
Re: Sql error ORA-00904 invalid identifier [message #184220 is a reply to message #184215] Tue, 25 July 2006 14:51 Go to previous message
reshmak24
Messages: 3
Registered: July 2006
Junior Member
ok.. I tried to create a synonym .. I dont have privileges for that. But when I prefixed with owner's name, that didnt work either.

select apps.ben_cwb_custom_person_pkg.get_custom_segment1(90224, 98282, '', 67031,
To_Date('05-jul-2005','dd-mon-yyyy'), TO_DATE('01-jul-2006', 'dd-mon-yyyy'))
from dual;

with apps too, am getting the same error.. I will try to get the privileges. but not sure if I can get that, since it is on Production..

Thanks for helping me..
Previous Topic: Dynamically Inserting Clob into tables in SP
Next Topic: variable from shell to sqlplus
Goto Forum:
  


Current Time: Fri Dec 02 16:36:03 CST 2016

Total time taken to generate the page: 0.31343 seconds