Write Multiple Queries in toracleRow

Eight Stars

Write Multiple Queries in toracleRow

Hi All,

Hope everyone is doing well Smiley Happy. I am facing an issue.I am trying to integrate multiple sql queries of Oracle in 1 toracleRow. I have already setup my toracleconnection using allowMultiQueries=true. But when I am using Multiple Queries with ";" separated by them giving ora error of sql command not properly ended. Is there any way of writing multiple queries in one Row components

@rhall_2_0@TRF@vboppudi

 


Accepted Solutions
Eight Stars

Re: Write Multiple Queries in toracleRow

Hi @rhall_2_0,

I resolved the issue context to this Article

 

https://community.talend.com/t5/Migration-Configuration-and/Executing-multiple-SQL-statements-with-o.... Actually for DDL have to use execute immediate. Smiley Happy

View solution in original post


All Replies
Community Manager

Re: Write Multiple Queries in toracleRow

You need a Begin and and End in your SQL. Follow this....

http://djugal.blogspot.com/2013/03/talend-writing-multiple-sql-queries-in.html

Highlighted
Eight Stars

Re: Write Multiple Queries in toracleRow

Hi @rhall_2_0,

I was trying with your solution.But still getting sql command not properly ended. I have tested my Oracle Connection with allowMultiQueries=true. Is there any different WayOut richard?

Community Manager

Re: Write Multiple Queries in toracleRow

It might be easier to resolve if you paste your query :-)

Eight Stars

Re: Write Multiple Queries in toracleRow

Hi @rhall_2_0,

Just this One.

Create Table B as select * from A;

truncate Table tableA;

That's it Smiley Sad

 

Community Manager

Re: Write Multiple Queries in toracleRow

Try this.....

 

"BEGIN
Create Table B as select * from A;
truncate Table tableA;
END"
Eight Stars

Re: Write Multiple Queries in toracleRow

Hi @rhall_2_0,

I resolved the issue context to this Article

 

https://community.talend.com/t5/Migration-Configuration-and/Executing-multiple-SQL-statements-with-o.... Actually for DDL have to use execute immediate. Smiley Happy

View solution in original post

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog