Skip to Main Content

SQL & PL/SQL

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!

ora-01791: not a Selected expression

indra budianthoOct 31 2014 — edited Nov 1 2014

Hi there, thank you in advance.

I run a query like this result in no rows found:

Select distinct col1

From t

Where col2='1' and col3 ='1'

Then i add order by clause:

Select distinct col

From t

Where col2='1' and col3='1'

Order by col4

In oracle database 11g enterprise edition release 11.2.0.3.0 - 64 bit production, the query run without errors.

The odds come when it runs on oracle database 11g enterprise edition release 11.2.0.4.0 - 64 bit production.

If col4's type is date then that error happens. If col4 is not type date it runs without error.

Best regards,

Ib

This post has been answered by unknown-7404 on Nov 1 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 29 2014
Added on Oct 31 2014
11 comments
5,060 views