syntax for WHERE conditions in Teradata Parallel Transporter

Tools & Utilities
Enthusiast

syntax for WHERE conditions in Teradata Parallel Transporter

Can anyone give me an example of the syntax to use in WHERE conditions including strings in TPT?

The tail end of my script in [B] below. I only inserted line 86 to the job script that the TPT wizard created.

I get the error message in [A] below.

TIA,
Nolan

[A]
line 74: syntax error at "SELECT" missing SEMICOL_ in Rule: Job Definition Body
Compilation failed due to errors. Execution Plan was not generated.
Job script compilation failed

[B]
/* 62 */ TO OPERATOR
/* 63 */ (
/* 64 */ W_1_o_BDE_02[1]
/* 65 */
/* 66 */ ATTRIBUTES
/* 67 */ (
/* 68 */ UserName = 'ABCDABCD',
/* 69 */ UserPassword = 'qqqqqqqq',
/* 70 */ LogTable = 'db01.t_2_log',
/* 71 */ TargetTable = 'db01.t_2',
/* 72 */ TdpId = '2222222'
/* 73 */ )
/* 74 */ )
/* 75 */ SELECT SUB_FIRM_ID, ACCOUNT_NBR, TRADE_DATE, EXECUTION_CNT FROM OPERATOR
/* 76 */ (
/* 77 */ W_0_o_BDE_02[1]
/* 78 */
/* 79 */ ATTRIBUTES
/* 80 */ (
/* 81 */ UserName = 'xxxxxxxx',
/* 82 */ UserPassword = 'yyyyyy',
/* 83 */ SelectStmt = 'SELECT SUB_FIRM_ID,ACCOUNT_NBR,TRADE_DATE,EXECUTION_CNT FROM db02.v_data;',
/* 84 */ DSNName = 'zzzzzzz'
/* 85 */ )
/* 86 */ Where sub_firm_id In ('001','003')
/* 87 */ );
/* 88 */ );
1 REPLY
Enthusiast

Re: syntax for WHERE conditions in Teradata Parallel Transporter

/* 83 */ SelectStmt = 'SELECT SUB_FIRM_ID,ACCOUNT_NBR,TRADE_DATE,EXECUTION_CNT FROM db02.v_data Where sub_firm_id In (''001'',''003'');',

TRY THIS.

IF above subfirm_id is Integer then
SUB_FIRM_ID,ACCOUNT_NBR,TRADE_DATE,EXECUTION_CNT FROM db02.v_data Where sub_firm_id In (001,003);',