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

Row Number and Select Distinct Query - response (1) by dnoeth

$
0
0

DISTINCT is processed after ROW_NUMBER which creates unique values :-)
You need to move the DISTINCT into a Derived Table:

SELECT ROW_NUMBER(....), dt.*
FROM
  ( SELECT DISTINCT ... FROM ...) AS dt 

 
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>