Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to execute multiple queries in one tSybaseRow component?

I have multiple SQL statements(both DDL and DML) of Sybase db. And I need to execute them in one tSybaseRow component. I tried with "allowMultiQueries=true" in the additional JDBC parameters section but it is not working. It's throwing error "Incorrect syntax near ';'" (The queries are separated by ';').

I have attached the screenshot of the tSybaseRow component. As of now, I am trying with only DML statements.

Please suggest solutions.. Thanks!

Labels (3)
5 Replies
Anonymous
Not applicable
Author

Hi,

 

    Since you are using same DB connection, you can create two tSybaserow components for each insert statements and connect them by OnSubjobOK. Once both are successful, you can use tSybaseCommit else you can use tSybaseRollback.

 

    In this way, you will get the same results. 

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

Anonymous
Not applicable
Author

Hi Nikhil,
Thanks for your response!
Actually I have many SQL queries (Almost 200+) and to execute each query, I have to use those many tSybaseRow conponents. Also I can't use Stored Procedure (As directed by my lead). So, is there any way in which I can execute multiple queries in one single sybase component? Because executing multiple queries is possible in Oracle or MySQL components using "allowMultiQueries=true" as additional JDBC parameter.

Thanks!
Anonymous
Not applicable
Author

Hi,

 

    Could you please raise this issue as a JIRA ticket for this specific component?

 

https://jira.talendforge.org

 

    Product team can then validate the issue and can help you with some patch if it is something missing from the current component setup.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

akumar2301
Specialist II
Specialist II

Try using tFlowToIterate  and iterate tSybaseRow for each update statement.

 

Hope this will help as workaround

Anonymous
Not applicable
Author

Hi akuma,

 

Thanks for your response. This workaround looks good but what if I have to use the value of context variable in the query, then how to write the query in the file. Eg.: "Update Employee
set emp_name="+context.name+" where emp_id=1";

 

This query is not working when I am putting it in a file but it is working when I am putting it in the tSybaseRow component.

Please suggest.

 

Thanks!