Home » SQL & PL/SQL » SQL & PL/SQL » Problem with SQL Space and Quotes
Problem with SQL Space and Quotes [message #376750] Thu, 18 December 2008 07:59 Go to next message
scamurcuoglu
Messages: 2
Registered: December 2008
Junior Member
Hi all,
We have some old generated java code which includes sql statements like:

select count ("ID") from SUBSCRIBER;

In our production database (10.2.0.2) this SQL works. In our test database (which is also 10.2.0.2), this SQL causes ORA-00942: table or view does not exist error. However, on the same test database, the following variations work:

SELECT count ("ID") from SUBSCRIBER;
select count (ID) from SUBSCRIBER;
select count("ID") from SUBSCRIBER;

I cannot change the original java code and I must configure our test database to execute the same SQL. I suspect this behaviour is caused by some oracle init parameters (maybe the "compatible" parameter?). Does anybody have any idea how this problem can be solved?

Best regards,

SerkanC
Re: Problem with SQL Space and Quotes [message #376761 is a reply to message #376750] Thu, 18 December 2008 08:47 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No, it is because:
- the object does not exist
- you haven't the appropriate privileges on it

Regards
Michel
Re: Problem with SQL Space and Quotes [message #376765 is a reply to message #376761] Thu, 18 December 2008 08:53 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Or you orginally tried to access the object with a synonym, which doesn't exists.
Re: Problem with SQL Space and Quotes [message #376793 is a reply to message #376765] Thu, 18 December 2008 10:03 Go to previous message
scamurcuoglu
Messages: 2
Registered: December 2008
Junior Member
Well, it seems like you're right, because I've tried the same SQL with another user on the same database and it works. Therefore it seems like I have a permission problem. Actually I've created made a schema import using impdp to create this schema. What might have gone wrong? The table resides within the tablespace which is the default tablespace of the user that I'm using, and I have access to it with the different SQL syntaxes as I've described above, but this specific SQL syntax does not for this specific user.
Previous Topic: Dynamic SQL Update using WHERE CURRENT OF CLAUSE
Next Topic: Question about tablespace
Goto Forum:
  


Current Time: Sat Dec 03 05:56:02 CST 2016

Total time taken to generate the page: 0.12603 seconds