Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 18 Mar 2005 @ 00:35:27 GMT


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


Subj:   Re: Changing a default database within a macro
 
From:   McCall, Glenn David

I don't believe you can. When macros (and views for that matter) are "compiled" all object references become fully qualified.

So it doesn't matter what database you have as your default the macro will operate against its original definition.

I can see why you might want to do what you are trying, but equally there will be people that say the macro should operate against its original database.

What you are trying to do is execute dynamic SQL, you could try using a stored procedure.


Good Luck

Glenn MC



     
  <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