|
|
Archives of the TeradataForum
Message Posted: Thu, 04 May 2006 @ 14:42:18 GMT
Subj: | | Re: Difference in row counts while using subquery |
|
From: | | Prescott, Kyle |
Your sort is causing the issue. Add the partitioning columns into the sort along with C10 and you should return the correct result. The
sorting by only C10 can throw the partition breaks off and you can return incorrect (seemingly random) results.
QUALIFY ROW_NUMBER ()
OVER ( PARTITION BY C8,C9, ORDER BY c8,c9,C10) = 1
Kyle Prescott
UnumProvident
| |