Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 16 Aug 2010 @ 13:44:01 GMT


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


Subj:   Re: Help needed on variable in BTEQ
 
From:   Mohommod.Khan

Try Creating a Volatile Table and store it there. As you are using it within the same script, it will be session specific. After you create the temporary table just ensure you specify 'ON COMMIT PRESERVE ROWS;'

Example would be:

     CREATE SET GLOBAL TEMPORARY TABLE
     MyDB.Batch_Track ,NO FALLBACK ,
        NO   LOG
          (
     my_ID   INTEGER NOT NULL,
     Batch_#   INTEGER NOT NULL )
     UNIQUE PRIMARY INDEX ( my_ID )
     ON COMMIT PRESERVE  ROWS;

Now you should be able to use the value further by joining or retrieving from this table. At the end of your work you can drop that table as well.

Hope this helps.


Thanks



     
  <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