Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Wed, 18 Nov 2015 @ 08:37:56 GMT

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

Subj:   Re: Question on Global Temp tables
From:   David Clough

I use a very similar method in my Stored Procedures.

When you mention GTT's, I assume you do actually mean Global Tempory Tables and not just Temp Tables ?

You also say, 'Now I delete the TEMP tables in the beginning of the procedure' .... again here, do you mean Delete From GTT, or do you Drop and Re-Create a TEMP Table, I wonder ?

First point to note, of course, is that the GTT is normally Created outside of the Stored Procedure, has a definition in the system catalogue and then an instance is materialized in the Stored Prodedure at run time - for the session.

I always Delete from the relevant GTT on the way in, and with this approach have never encountered data hanging around from the last call. ?If you're using a shared session, then it is important to Delete on the way in or I guess there could be a case of reading existing data from a session used by someone else.

So, doesn't really answer your question, I know, but I can't say I've encountered your issue ...


David Clough
Senior BI Database Designer
BI Competency Centre

  <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: 24 Jul 2020