Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 08 Oct 2013 @ 14:59:06 GMT

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

Subj:   Re: Record count mismatch
From:   Anomy Anom

<-- Anonymously Posted: Tuesday, October 08, 2013 09:01 -->


There are multiple records with same key values(TBL1.KEY_1, TBL1.KEY_2) in table 2, that's why there are 6 records as inner join output

     Select TBL2.KEY_1, TBL2.KEY_2 from table
     Group by TBL2.KEY_1, TBL2.KEY_2
     Having count(*) >1

Above sql will give duplicate entries in table 2 on key columns and you can use same sql to join table 1 also to get desired output stated by you


  <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: 24 Jul 2020