R
R
Reenuay2016-06-21 10:33:05
Oracle
Reenuay, 2016-06-21 10:33:05

How to fix ORA-00904 error in Oracle?

Hello! I'm having an error getting privileges from an Oracle schema. The error is unclear to me, since an exactly identical request gives an error in one project, but not in another.
The first project is written purely in Perl without using any frameworks, the second is on the same server but written using Mojolicious::Lite. I use DBI to connect to the database.
Here is the query itself: SELECT privilege FROM user_tab_privs
WHERE owner = $schema AND grantee = $username AND table_name = $table identifier (DBD ERROR: error possibly near <*> indicator at char 170 in.
The values ​​passed are 100% correct. The schema has a view called CITY_V. Privileges are also correct. This is easy to see if you leave the query like this:
SELECT privilege FROM user_tab_privs
This query will be processed without error.
I will be grateful for the information.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2016-06-21
@Reenuay

Apparently CITY_V is passed not enclosed in single quotes. Should be something like
SELECT privilege FROM user_tab_privs WHERE owner = '$schema' AND grantee = '$username' AND table_name = '$table';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question