Common Oracle Errors

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.