Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 12 Oct 2009 @ 13:46:19 GMT


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


Subj:   Re: Volatile table in procedure
 
From:   Geoffrey Rommel

This will not work. A volatile table exists only during the session in which it is created. When a procedure is compiled, the parser resolves certain object references. The above statement tells the parser that you want to create a volatile table VT2 during a session (S2) that does not yet exist.

However, you can use dynamic SQL:

     set create_stmt = 'create volatile table VT2 .......';
     call DBC.SysExecSQL(create_stmt);

Why? Because now the statement will not be executed until run time, i.e. when session S2 does exist.

I prefer permanent tables or GTT's for this sort of thing.



     
  <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