Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Tue, 17 Jul 2012 @ 15:24:15 GMT


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


Subj:   Re: Select records with valid values except the key field
 
From:   naresh.neelam

Hi Jay,

Your senario will acheive through the following logic, but any way its give performance issues i think , may be its helpful for you

     SELECT EMPLOYEE_NUMBER,MANAGER_EMPLOYEE_NUMBER,DEPARTMENT_NUMBER,JOB_CODE,
       LAST_NAME,FIRST_NAME,HIREDATE,BIRTHDATE FROM
     (SELECT EMPLOYEE_NUMBER,MANAGER_EMPLOYEE_NUMBER,DEPARTMENT_NUMBER,JOB_CODE,
       LAST_NAME,FIRST_NAME,HIREDATE,BIRTHDATE, RANK() OVER(PARTITION BY NULL  ORDER BY MANAGER_EMPLOYEE_NUMBER,
       DEPARTMENT_NUMBER,JOB_CODE, LAST_NAME,FIRST_NAME,HIREDATE,BIRTHDATE  )
       AS RANK_1  FROM STGDB.EMPLOYEE
      QUALIFY  RANK_1<>1) ABC

Thanks,

Naresh Neelam



     
  <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: 28 Jun 2020