Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 03 Apr 2012 @ 09:30:09 GMT


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


Subj:   Volatile tables within Stored Procedures
 
From:   Mark Young

All,

Can someone please advise if it is possible to create a volatile table and populate it within a stored procedure?

     Replace Stored Procedure db.sp1()

     Begin

     Create volatile table tmp_table
     ?(numid int)?
     on commit preserve rows;

     insert into tmp_table
     select numid
     from db1.table;

     End;

I have tried, but keep getting a message that the table does not exist.?

We have discovered that you need to create the table first when creating the stored procedure the first time for normal tables, otherwise we get the same message, but to do this for a few hundred stored procedures seems like a waste of time.


Mark Young



     
  <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: 27 Dec 2016