All Forums Tools
NMadson-3173 44 posts Joined 09/06
09 Feb 2007
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 BodyCompilation 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 */ );

srikant 5 posts Joined 02/07
27 Mar 2007

/* 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);',

You must sign in to leave a comment.