Database Install/Upgrade/Opatch (MOSC)

MOSC Banner

Oracle returns zero rows when using distinc clause or order by clause

edited May 8, 2020 5:03AM in Database Install/Upgrade/Opatch (MOSC) 8 commentsAnswered

Hi guys,

i've got weird problemy with one of our 11.2.0.1 database ( I know it should be patched but it's not up to me).

The problem is, when selecting data without distinct clause everything works fine. But if I use distinct clause in my SELECT statement from some views (not every view) it shows no rows.

For example:

Select distinct A from MYview; ---> no rows

Select A from MYview; ---> many records

Also - i saw that the problem is also connected with order by clause.

For example:

Select A from MYview order by 1; ----> no rows

Select A from MYview; ---> shows all data

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center