Archives of the TeradataForum
Message Posted: Thu, 02 Aug 2012 @ 19:11:38 GMT
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 ?
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|