Error Sql Code=920 Message=ora-00920 Invalid Relational Operator
Contents |
MySQL MariaDB PostgreSQL SQLite MS Office Excel Access Word Web Development HTML CSS Color Picker Languages
Ora-00920 Invalid Relational Operator In Clause
C Language More ASCII Table Linux UNIX Java Clipart ora-00920 invalid relational operator join Techie Humor Advertisement Oracle Basics ALIASES AND AND & OR BETWEEN COMPARISON OPERATORS DELETE DISTINCT
Ora-00920 Invalid Relational Operator Regexp_like
EXISTS FROM GROUP BY HAVING IN INSERT INSERT ALL INTERSECT IS NOT NULL IS NULL JOIN LIKE MINUS NOT OR ORDER BY PIVOT REGEXP_LIKE invalid relational operator date SELECT SUBQUERY TRUNCATE UNION UNION ALL UPDATE WHERE Oracle Advanced Oracle Cursors Oracle Exception Handling Oracle Foreign Keys Oracle Loops/Conditionals Oracle Transactions Oracle Triggers String/Char Functions Numeric/Math Functions Date/Time Functions Conversion Functions Analytic Functions Advanced Functions Oracle / PLSQL: ORA-00920 Error Message Learn the cause and how to resolve ora 00920 invalid relational operator discoverer the ORA-00920 error message in Oracle. Description When you encounter an ORA-00920 error, the following error message will appear: ORA-00920: invalid relational operator Cause You tried to execute a SQL statement, but the WHERE clause contained an invalid relational operator. Resolution The option(s) to resolve this Oracle error are: Option #1 Correct the WHERE clause. Valid relational operators are as follows: = != ^= <> < <= > >= ALL ANY BETWEEN NOT BETWEEN EXISTS NOT EXISTS IN NOT IN IS NULL IS NOT NULL LIKE NOT LIKE Share this page: Advertisement Back to top Home | About Us | Contact Us | Testimonials | Donate While using this site, you agree to have read and accepted our Terms of Service and Privacy Policy. We use advertisements to support this website and fund the development of new content. Copyright © 2003-2016 TechOnTheNet.com. All rights reserved.
here for a quick overview of the site Help Center Detailed answers to
Ora-00920 Invalid Relational Operator In Informatica
any questions you might have Meta Discuss the workings and policies oracle relational operators of this site About Us Learn more about Stack Overflow the company Business Learn more
Ora-00920 Invalid Relational Operator Not Exists
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack https://www.techonthenet.com/oracle/errors/ora00920.php Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Get error “ORA-00920: invalid relational operator” on count within where clause up vote 0 down vote favorite This is an employee to dependent relationship. I am having trouble http://stackoverflow.com/questions/12734563/get-error-ora-00920-invalid-relational-operator-on-count-within-where-clause displaying only the employee who has more than one dependent. The line that should not be there is for emp_no 555555. SELECT emp_no, emp_name, dep_emp_no, dep_name, dep_relationship, trunc(MONTHS_BETWEEN(current_date, dep_date_of_birth)/12) "Age" FROM DEPENDENT d JOIN employee e ON e.emp_no=d.dep_emp_no WHERE dep_date_of_birth=(SELECT MIN(DEP_DATE_OF_BIRTH) FROM DEPENDENT dd WHERE d.dep_emp_no=dd.dep_emp_no) EMP_NO EMP_NAME DEP_EM DEP_NAME DEP_RELATI Age ------ ------------------------------ ------ -------------------- ---------- ---------- 444444 Hickman, Ron 444444 Amy DAUGHTER 22 555555 Moore, Wayne 555555 Sharon SPOUSE 65 111111 Li, Anna 111111 Chris SON 8 This is what is giving me the error: SELECT emp_no, emp_name, dep_emp_no, dep_name, dep_relationship, trunc(MONTHS_BETWEEN(current_date, dep_date_of_birth)/12) "Age" FROM DEPENDENT d JOIN employee e ON e.emp_no=d.dep_emp_no WHERE dep_date_of_birth=(SELECT MIN(DEP_DATE_OF_BIRTH) FROM DEPENDENT dd WHERE d.dep_emp_no=dd.dep_emp_no) and where DEP_EMP_NO exists (select count(dep_emp_no) from dependent having count(dep_emp_no)>1 group by dep_emp_no); sql oracle10g share|improve this question edited Oct 4 '12 at 19:50 hol 6,17251944 asked Oct 4 '12 at 19:34 user1084561 5427 add a comment| 1 Answer 1 activ
relational operator Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.ORA-00920: invalid relational operatorAlthough http://oraclequirks.blogspot.com/2008/06/ora-00920-invalid-relational-operator.html this error is caused most likely by trivial errors, actually it gives me a chance to talk about some SQL operators whose real meaning and side effects, in my humble opinion, are everything but clearly documented.Funnily enough, it seems that this error message has been removed altogether from the official documentation relational operator starting from version 10R1, but this doesn't mean it cannot be returned!Let's start then from the error:select * from user_objectswhere (object_name, object_type) =(('PLSQL_PROFILER_RUNS', 'TABLE'),('PLSQL_PROFILER_UNITS', 'TABLE'),('PLSQL_PROFILER_DATA', 'TABLE'));ORA-00920: invalid relational operatorThe problem is in that we cannot perform a comparison in this fashion because on the right hand side of the operator there isn't invalid relational operator a single value but a list of values (a list of lists in this case).However we can easily fix the SQL statement in this wayselect * from user_objectswhere (object_name, object_type) = ANY(('PLSQL_PROFILER_RUNS', 'TABLE'),('PLSQL_PROFILER_UNITS', 'TABLE'),('PLSQL_PROFILER_DATA', 'TABLE'));Now, if you have the PL/SQL profiler objects installed in your schema, you should get three rows as result of this query, otherwise you'll get none, but in any case, no syntax errors will be returned.Note also that the query above is perfectly equivalent to:select * from user_objectswhere (object_name, object_type) IN(('PLSQL_PROFILER_RUNS', 'TABLE'),('PLSQL_PROFILER_UNITS', 'TABLE'),('PLSQL_PROFILER_DATA', 'TABLE'));Personally i tend to write SQL statements preferably using the IN clause rather than = ANY.Now, instead of using a fixed set of allowed values, let's write a more generic query :select * from user_objectswhere (object_name) = SOME (select t.table_namefrom user_tables twhere t.table_name like 'PLSQL%');SOME is synonym of ANY, just in case you wonder what's the difference between the two operators.Again, if the PL/SQL profiler ta