Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Apex 19.2 issue/bug with IG column type SQL Expression

InoLOct 29 2019 — edited Oct 30 2019

Apex 19.2 changed it's internal workings and changed alias q to d. Why is that a problem? Because SQL Expression column type may need the q alias (for performance reasons or to make it work).

This is a case:

select DEPTNO,

          DNAME,

         LOC

from DEPT

Add SQL Expression column:

(select count(*) from emp e where e.deptno = DEPTNO)

This is actually an incorrect example in the Help and it will give the wrong result! You will need to use an alias because of internal query rewrites. The expression used to be:

(select count(*) from emp e where e.deptno = q.DEPTNO)

This now gives an error:

ora_sqlerrm: ORA-00904: "Q"."DEPTNO": invalid identifier

Running the page in debug mode I saw that the q alias is now d, so the expression is now:

(select count(*) from emp e where e.deptno = d.DEPTNO)

We've been using the q alias regularly, so this will be an issue when 19.2 becomes production.

This post has been answered by Carsten Czarski-Oracle on Oct 30 2019
Jump to Answer
Comments
Post Details
Added on Oct 29 2019
2 comments
471 views