Issue with User Defined SQL in DS6.0R3

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
zam62
Participant
Posts: 42
Joined: Tue Apr 29, 2003 12:21 pm

Issue with User Defined SQL in DS6.0R3

Post by zam62 »

I have been having a problem with an insert using User Defined SQL. When I perform the INSERT, I get "EDWItem2Dim..ITEM_INSERT: ORA-01008: not all variables bound". I changed the job to use "Insert Rows Without Clearing" and it worked fine. Without changing anything else, I copied the SQL from the generated Tab and pasted it into the "User Defined" tab. I then changed the job to use "User Defined SQL"
and got the same error "EDWItem2Dim..ITEM_INSERT: ORA-01008: not all variables bound"
Why would it work in Generated and not in User Defined???

Here is the SQL that I Cut and Pasted:
INSERT INTO EDW_ADMIN.ITEM (ITEM_CODE,ITEM_DESC,ITEM_GROUP_NBR,STORAGE_TYPE_CODE,C_BRACKET_PRICE,PACK_AMT,CATCH_WEIGHT_FLAG,LESS_CASE_FLAG,CASE_YIELD,KOSHER_FLAG,CN_FLAG,SHELF_LIFE,THAW_INSTRUCTION,PREPARE_INSTRUCTION,MRKTING_INSTRUCTION,AVAIL_US_FLAG,AVAIL_CANADA_FLAG,ITEM_GROUP_SEQ,GFS_BRAND_FLAG,DELETED_FLAG,SPECIAL_ORDER_FLAG,NEW_ITEM_FLAG,STATUS_CODE,STATUS_DATE,LC_PACK_TYPE_DESC,SELLING_UNIT,ITEM_TYPE_NBR,COMMISSION_CODE,ITEM_INTERNAL_DESC,PRIME_VENDOR_NBR,PRODUCE_BONUS_CODE,PRICE_CHANGE_FREQUENCY_CODE,NET_WEIGHT_AMT,PACKER_NAME,ITEM_2_DESC,NO_PRINT_FLAG,ITEM_PRICE_GROUP_NBR,PORTIONS_PER_CASE_QTY,FINISH_PORTIONS_PER_CASE_QTY,UNIT_OF_MEASURE_CODE,ADDITIONAL_INFO_FLAG,RETAIL_REQUIRED_STK_IND,COMPETITIVE_MARKETING_INFO_TXT,STOCKING_CODE,VENDOR_ITEM_CODE,BAR_CODE,SALES_REPORT_BAR_CODE,UNIT_CUBE_AMT,GROSS_UNIT_WEIGHT_AMT,PRIVATE_LABEL_CODE,PRIVATE_LABEL_DESC,BRAND_NAME) VALUES (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23,TO_DATE(:24, 'YYYY-MM-DD HH24:MI:SS'),:25,:26,:27,:28,:29,:30,:31,:32,:33,:34,:35,:36,:37,:38,:39,:40,:41,:42,:43,:44,:45,:46,:47,:48,:49,:50,:51,:52)

David Abbey
dabbey@gfs.com
"...Rise Above..."
chunsli
Participant
Posts: 23
Joined: Sun Aug 10, 2003 5:31 pm

Post by chunsli »

Try to use DS generated SQL query as a template to customize your (user-defined) SQL statement. I agree with you that it is frustrating, as I have a weird case too.
Use defined can only accept "DELETE FROM TABLE_1", not "TRUNCATE TABLE TABLE_1" which makes more sense when purging records.
Post Reply