Home Page for the TeradataForum

Archives of the TeradataForum

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

  <Prev Next>  
Next> Last>>  

Subj:   Volatile tables within Stored Procedures
From:   Mark Young


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()


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

     insert into tmp_table
     select numid
     from db1.table;


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>  
Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023