Skip to Main Content

DevOps, CI/CD and Automation

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!

Oracle Call Interface: "ORA-01791: not a SELECTed expression."

2980326Jun 29 2015 — edited Jul 17 2015

When calling a query through OCIStmtExecute() method an "ORA-01791: not a SELECTed expression." error gets thrown. When calling the same query via SQL developer it produces no errors. The error gets thrown when using DISTINCT + GROUP BY + ORDER BY clauses.

Calling "SELECT DISTINCT DUMMY FROM DUAL GROUP BY DUMMY ORDER BY DUMMY" will throw an error, when called with OCIStmtExecute() method (OCI versions tested 12.1.0, 11.2.0.), but it will run fine in SQL developer. Is there a fix to this problem?

Comments

unknown-951199

submit a Bug Report to My Oracle Support.

Bashar.

Hi,

What is the database full version number?

Regards,

Bashar

2980326

I'm using Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

Unfortunately I don't have Oracle support to submit bug report.

Had to rewrite the whole query to fix the problem in time

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 14 2015
Added on Jun 29 2015
3 comments
1,514 views