Archives of the TeradataForum
Message Posted: Wed, 18 Nov 2015 @ 08:37:56 GMT
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 ...
|Copyright 2016 - All Rights Reserved|
|Last Modified: 24 Jul 2020|