Executing multiple SQL statements with one tOracleRow component - 7.2

Oracle

EnrichVersion
7.2
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
EnrichPlatform
Talend Studio
task
Data Governance > Third-party systems > Database components > Oracle components
Data Quality and Preparation > Third-party systems > Database components > Oracle components
Design and Development > Third-party systems > Database components > Oracle components
This article explains how to execute multiple SQL statements using a single tOracleRow component rather than multiple components.

Procedure

  1. Drop a tOracleRow component from the Palette to the design workspace.
  2. Double-click tOracleRow and enter the below statements in the Query field:
    "begin
    update table1 set name='Shong' where id=2;
    update table1 set name='Patrick' where id=3;
    delete from table1 where id=4;
    commit;
    end;"
                        
    Note: The above example has only DML statements. If the group of SQL statements contains DDL statements, type execute immediate followed by the DDL statement. For example:

    begin
    update table1 set name='Shong' where id=2;
    execute immediate 'drop table t3';
    commit;
    end;