Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 09 Sep 2002 @ 17:04:06 GMT


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


Subj:   Re: Macro to loop thru different databases
 
From:   Burton, Bruce

all the databases reside in Teradata and can be joined.

select count(*)
from database1.customers

select (*)
from database2.customers

what I want to do is to automatically do a 'union all' on the above database1-2...I actually have database1-10 and did not want to run the same query for 10 markets. In SAS I can just run a proc sql macro that will loop thru the markets and then summarize the results...was not sure how to do a teradata macro in sql.


Thanks,

Bruce



     
  <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