Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 14 Aug 2006 @ 12:06:59 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Request for help in converting the below query
 
From:   Dieter Noeth

Just add a QUALIFY with that condition:

     Where
        SRC_DW_CD = :src_dw_cd_in
     qualify
        count(*) over (partition by SRC_DW_CD,
                                    CLM_SRC_SYS_CD,
                                    CLM_NBR,
                                    CLM_LN_NBR,
                                    MBR_KEY,
                                    CLM_LN_ADJMT_NBR) = 1
     or
       (
        count(*) over (partition by SRC_DW_CD,
                                    CLM_SRC_SYS_CD,
                                    CLM_NBR,
                                    CLM_LN_NBR,
                                    MBR_KEY,
                                    CLM_LN_ADJMT_NBR) > 1
        and clm_disp_cd = 'READJ'
       )

Dieter



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023