Hi all,
I would like to assign the value Current_Timestamp directly at the level of the loading stage. My first attempt of replacing the value ":MOD_DT_TM" by Current_Timestamp resulted in an error.
Mload Script:
dml label tdmload do update the existing rows;
UPDATE #ThisDataBase#.#Table#
SET EMAIL_ADDR = :EMAIL_ADDR,
MOD_DT_TM = current_timestamp
WHERE CUST_ACCT_ID = :CUST_ACCT_ID;
import INFILE #FilePath#/Dly/multiload/#ThisJob# format fastload
layout internal apply tdmload;
Thanks
MAT
Load type custom
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Current_Timestamp is an Sql teradata variable. I Agree with you about the format of the TimeStamp in DataStage but I would like to use this current_Timestamp as it is more accurate.
When I see the Log report, I have this message :
"DML label name 'TDMLOAD' was not previously defined."
TDMLOAD is the Teradata Stage.
Thanks
MAT
When I see the Log report, I have this message :
"DML label name 'TDMLOAD' was not previously defined."
TDMLOAD is the Teradata Stage.
Thanks
MAT
The Answer is :[:p]
.dml label tdmload;
UPDATE #ThisDataBase#.#Table#
SET EMAIL_ADDR = :EMAIL_ADDR,
MOD_DT_TM = current_timestamp
WHERE CUST_ACCT_ID = :CUST_ACCT_ID;
.import INFILE #FilePath#/Dly/multiload/xxx format fastload
layout internal apply tdmload;
with xxx : name of your stage. And the field "MOD_DT_TM" has to be declared in your Input file as if you don't take the value.
MAT
.dml label tdmload;
UPDATE #ThisDataBase#.#Table#
SET EMAIL_ADDR = :EMAIL_ADDR,
MOD_DT_TM = current_timestamp
WHERE CUST_ACCT_ID = :CUST_ACCT_ID;
.import INFILE #FilePath#/Dly/multiload/xxx format fastload
layout internal apply tdmload;
with xxx : name of your stage. And the field "MOD_DT_TM" has to be declared in your Input file as if you don't take the value.
MAT