1.
Invalid relational operator
Ora-00920:invalid relational operator
Ora-00920:invalid relational operator ORA-00920: Invalid relational operator
This error is sometimes reported when SQL copied from the AWR is run in Plsql Dev. It's strange, how did SQL in AWR get an error? This should be caused by a bug when Oracle generated the AWR.
This error is often caused by extra space added to the awr, as in the example where Coa_ cu stomer = customer_id adds two more spaces to the previous line, the correct one should be: where Coa_customer = Customer_ ID
After removing these extra spaces, you will not get an error. The problem is that when the awr out of this error, generally longer SQL, it is often necessary to use the naked eye to find out where the problem is, more time-consuming and laborious.
2.
ora-00936:missing expression in Oracle
Two the same view, but the name is not the same, I add a piece of data in one, can be executed normally, in the other one reported this error, in the following statement
SUM (case if substr (c.pd_proj_type_code_de,4,3) = ' 609 ' then c.pd_tzly_sum else 0 end) JBYBF_SUM_SJ,
SUM (case
SUBSTR (c.pd_proj_type_code_de,1,4) in (' 1111 ', ' 1211 ', ' 1221 ', ' 1231 ', ' 1311 ', ' 1401 ')
Then C.pd_tzly_cz else 0 end) Jbybf_sum_bz I only added a ' 1401 '
Solve:
Put:------------------------------------ sum (case
SUBSTR (c.pd_proj_type_code_de,1,4) in ------------------------------------
The empty line between the lines. This is a writing grammar problem.
Common Oracle Errors