Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Need Suggestions - response (1) by Qaisar Aftab Kiani

$
0
0
This is logical. If there is one value in lookup table and there are 15 values in joining tables then you get the 15 records. If you need only single record from the main table then you can use the ROW_NUMBER or RANK and get the single record. Both of these functions assign sequential unique number to the records. SELECT... FROM... WHERE.... QUALIFY RANL() OVER(PARTITION BY <<column_list>> ORDER BY <<column_list>>) = 1 If you have any explicit requirement then share the details...

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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