-
IS THERE ANY WAY TO TRIGGER LOW COLLATION OF NULLS IN ORACLE (Maybe an environment variable). eg. select * from table order by column2 - where table contains 3 records:
A NULL
A XXXX
B NULL
displays:
A XXXX
A NULL
B NULL
but required order is (As per INFORMIX):
A NULL
A XXX
B NULL
NOTE: Obviously this is a simplified case
autouser
-
Remember Oracle is a Relational Data Base, this means, quering data from a table does not retrieve always same order, so if you query 100 times a table, maybe you get 99% times same order and just 1% any others and that is OK.
-
Try order by col1, nvl(col2, low_value)
In your example, if it is character data, then the lowest value is 'a', so use
order by col1, nvl(col2, 'a')
HTH
David.
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
|