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 (1) by RB185048

$
0
0
Hi.. Hope below query helps you out.. sel Serial_Number, Send_Date , Count(*)  as File_Count , Case When ( Max_Seq - Min_Seq ) + 1 = File_Count Then ' No'  Else 'YES' END as Non_Seq_Flag, Min (File_Number) as  Min_Seq, max( File_Number) as Max_Seq from <<Source_Table>> group by Serial_Number, Send_Date regards, Rupesh  

Viewing all articles
Browse latest Browse all 14773

Trending Articles



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