My Oracle Support Banner

Forms12c Default Where/Order By With Carriage Return After Where/Order By Fails FRM-40505 (Doc ID 2504206.1)

Last updated on MARCH 21, 2019

Applies to:

Oracle Forms - Version 12.2.1.0.0 and later
Information in this document applies to any platform.

Symptoms

If the data block property ORDER BY Clause or WHERE clause contains a carriage return after 'WHERE' or 'ORDER BY', when running the form in 12c it will return an error when attempting to execute the query:

FRM-40505: ORACLE error: unable to perform query

Selecting from the menu "Help/Display Error" displays:

ORA-00936: missing expression.

It also shows a query with extra 'ORDER BY' or 'WHERE' like the following:

SELECT ROWID,EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO FROM emp WHERE WHERE EMPNO IS NOT NULL order by EMPNO

SELECT ROWID,EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO FROM emp order by ORDER BY EMPNO

The above select statements are based off of the fictitious scott/tiger demo tables.

This behavior does not occur in 11.x version of Forms.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.