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
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,516 views