This is an almost self-explanatory error message that occurs when you write a SQL statement like:
select * from user_objects
where object_name =
('PLSQL_PROFILER_RUNS','PLSQL_PROFILER_UNITS','PLSQL_PROFILER_DATA');
ORA-01797: this operator must be followed by ANY or ALL
I guess it is one of those rarely seen error messages because it requires two conditions:
- a list of literals (in green color above)
- a missing comparison operator in the set: ALL, ANY, SOME.
If the list of literals is replaced by a subquery and if the number of records returned is greater than one, the error returned becomes ORA-01427.
If the query above was meant to return all rows matching any of the three names given in the list, you have two options:
select * from user_objectsor
where object_name = ANY -- or SOME
('PLSQL_PROFILER_RUNS','PLSQL_PROFILER_UNITS','PLSQL_PROFILER_DATA');
select * from user_objectsSee message translations for ORA-01797 and search additional resources.
where object_name IN
('PLSQL_PROFILER_RUNS','PLSQL_PROFILER_UNITS','PLSQL_PROFILER_DATA');
1 comment:
Thanks
Post a Comment