Archives of the TeradataForum
Message Posted: Mon, 16 Aug 2010 @ 13:44:01 GMT
Subj: | | Re: Help needed on variable in BTEQ |
|
From: | | Mohommod.Khan |
Try Creating a Volatile Table and store it there. As you are using it within the same script, it will be session specific. After you create
the temporary table just ensure you specify 'ON COMMIT PRESERVE ROWS;'
Example would be:
CREATE SET GLOBAL TEMPORARY TABLE
MyDB.Batch_Track ,NO FALLBACK ,
NO LOG
(
my_ID INTEGER NOT NULL,
Batch_# INTEGER NOT NULL )
UNIQUE PRIMARY INDEX ( my_ID )
ON COMMIT PRESERVE ROWS;
Now you should be able to use the value further by joining or retrieving from this table. At the end of your work you can drop that
table as well.
Hope this helps.
Thanks
|