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

Checking sequence of numbers and populate a flag if number is out of sequence - response (3) by RB185048

$
0
0
just ensure the table has not duplicate records like.. Either define the table as SET which will have CPU-I/O overhead for duplicate row check Or before executing above query check duplicates by sel Serial_Number, Send_Date , File_Number from <<Source_Table>> group by Serial_Number, Send_Date , File_Number Having count(*) > 1 ;   Serial_Number Send_Date File_Number 876543890 1-Jan-13 345 876543890 1-Jan-13 345 876543890 1-Jan-13 347 if there are duplicates then above query will not give proper answers.

Viewing all articles
Browse latest Browse all 14773

Trending Articles



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