-
How to order with count value=0
I have written a simple query that involves a count and outer join.
To get around the nulls an outer join may produce, i have used nvls(column,) so that nulls are replaced by 0
I wish now to order my records ascending by the count from 0 to infinity however I have found that 0 is considered to be order last
Eg
Region Count
B 1
C 5
D 7
A 0
How can i get it to return
Region Count
B 0
C 1
D 5
A 7
Is there a mask or something. Using to_number did not work and to_char is also not practical if your count is two digit number.
Thanks
-
-
Thanks
[ NULLS FIRST | NULLS LAST ]
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|