Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 15 Jul 2004 @ 17:34:50 GMT


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


Subj:   Re: Comparing output from two SQLs
 
From:   Jim Downey

I assume that you want to know if the two produce the same result.

     Select count(*)
     From
     (
     ...First SQL goes here...

     MINUS

     ...second SQL goes here....

     )
     ;

If the datasets are the same, you will get 0. Actually, if all the rows from the second record set are found in the first, you will get 0. If it is possible that you will get rows in the first that are not in the second, you would have to run the sql twice by switching the order of the two sql statements.

If the columns are different, you will get an error.



     
  <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