One Star

Adding Multiple DDL statements in tOracleRow Componet

Hi,
I have to create 5 indexes in my target table after completion of dataload. I am using toracleRow and use the 5 Create Index statement over there. I am facing an error "Invalid Character". Will this component allow to use more than one index?
I added the below syntax in the "Query" tab of tOracleRow component. Is there any syntax error on this?
"create index STAGE_DDIARY_CA_IDX on STAGE_DDIARY(CA_EVENT_REF);
create index STAGE_DDIARY_CHECKLIST_IDX on STAGE_DDIARY(CHECKLIST);
create index STAGE_DDIARY_CHKLST_ID_IDX on STAGE_DDIARY(CHECKLIST_ID);
create index STAGE_DDIARY_CODE_IDX on STAGE_DDIARY(CODE);
create index STAGE_DDIARY_OPID_IDX on STAGE_DDIARY(OPID);
create index STAGE_DDIARY_PT1_IDX on STAGE_DDIARY(CHECKLIST, REVIEW_TYPE, CHECKLIST_ID, TASK);
create index STAGE_DDIARY_REVTYPE_IDX on STAGE_DDIARY(REVIEW_TYPE);
create index STAGE_DDIARY_IDX05 on STAGE_DDIARY(OPID, CODE, DIARY_DATE);"
Awaiting for your inputs and help.
Thanks
SUNDARESAN V
1 REPLY
Community Manager

Re: Adding Multiple DDL statements in tOracleRow Componet

Dear user
if the group of SQL statements contains DDL statements, you are required to use EXECUTE IMMEDIATE command followed with the DDL statement. For example:

"begin
execute immediate 'create statement 1';
execute immediate 'create statement 2';
commit;
end;"
----------------------------------------------------------
Talend | Data Agility for Modern Business