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


All Replies
Sixteen Stars

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

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?

Sixteen Stars

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

 

Sixteen Stars

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