Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 02 Aug 2012 @ 19:11:38 GMT


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


Subj:   Temp Space in Bteq
 
From:   David Clough

I've hit what I think is the most frustrating situation I've ever encountered .....

I've got two Stored Procedures, call them A_PROC and B_PROC.

The code within B_PROC needs to interrogate rows added to a Global Temporary Table, placed in there by A_PROC - within the same session.

Now this seems to work fine if I simulate the Bteq code within SqlAssistant; the values in the GTT are indeed carried over and are then used effectively within B_PROC.

     CALL A_PROC('CNADMIN_T', 'CNRNOT01', ResultCode, ResultMsg, SqlMsg);


     SELECT RECORD_CT AS nGNotEqualCt
       FROM POPULATE_AUDIT_GTT
       WHERE RECORD_TYPE_CD = 'NEQ';

This value is then used in the next Procedure (correctly within SqlAssistant) .....

     CALL B_PROC('CNRNOT92', 'N', ResultCode, AuditWrittenIn, ResultMsg, SqlMsg);

But .... within Bteq - used in a Linux environment - it appears that these values in the GTT are NOT carried across.

Now, before you think "Ah, well the Temp Space of the GTT must be that of the logged on User", I have indeed logged on with the same User, both for SqlAssistant and Bteq.

So, is this a fundamental problem with GTT's or am I just as likely missing something simple, do you think ?


Regards

David Clough
Senior BI Database Designer



     
  <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