|  |  | Archives of the TeradataForumMessage Posted: Tue, 14 Nov 2006 @ 15:07:18 GMT
 
 
  
| Subj: |  | Re: Help on SQL query |  |  |  | From: |  | Michael Larkins |  
 RAJESH: This is a perfect job for using MDIFF of 1 or manually subtracting MIN/OVER with ROWS 1 PRECEDING from the column where the function sorts and
subtracts using your column in question.   You will also need a QUALIFY looking for a difference between the numbers > 1 (a gap exists).  These
OLAP functions provide some very powerful capabilites. 
 Regards, Michael LarkinsCertified Teradata Master
 Certified Teradata SQL Instructor
 
 
 |  |