Forum Stats

  • 3,769,507 Users
  • 2,252,970 Discussions
  • 7,875,064 Comments

Discussions

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

2980326
2980326 Member Posts: 3
edited Jul 17, 2015 5:41AM in Oracle Call Interface (OCI)

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?

Tagged:

Answers

This discussion has been closed.