Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

NULLS are treated as high priority when assigned row numbers with in a group - response (2) by dnoeth

$
0
0

A Derived Table shouldn't change that, when you sort descending NULLs are sorted last.
In your example you ordered by DNAME and all rows had NULL in it, maybe you ment DNO.
 
For changing the default sort order of NULLs you have to use "CASE WHEN col IS NULL THEN 1 ELSE 1 END, col DESC" or wait for TD14.10, which adds NULLS FIRST/LAST :-)
 
Dieter


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>