[resolved] URGENT: please help How can I write a query with double quote?

One Star

[resolved] URGENT: please help How can I write a query with double quote?

Hi,
I had an OracleInput which I had the following query:
"SELECT "+context.oracle_Schema+".tablea"+".ID,
"+"REGEXP_SUBSTR(REGEXP_SUBSTR("+context.oracle_Schema+".tablea"+".linkdesc,'+',1,1),'+',1,2) linkdesc"
+"FROM "+context.oracle_Schema+".tablea"
I encountered the following errors:
Multiple markers at this line
- Syntax error on token ""+"", delete this token
- Syntax error on token ""+"", delete this token
- Syntax error, insert ";" to complete Statement
- Syntax error, insert ")" to complete MethodInvocation
- Syntax error, insert "AssignmentOperator Expression" to complete
Assignment
- Syntax error, insert ";" to complete Statement
- Syntax error, insert "AssignmentOperator Expression" to complete
Assignment
- Syntax error, insert ";" to complete Statement
- Syntax error on token ""+"", ) expected
- Syntax error on token ""+"", delete this token
I am wondering how can I have a query with double quotes?
Any help is really really appreciated!
Thanks in advance!

Accepted Solutions
Employee

Re: [resolved] URGENT: please help How can I write a query with double quote?

You have to escape the double quote in the SQL Query with \ (\")

All Replies
Employee

Re: [resolved] URGENT: please help How can I write a query with double quote?

You have to escape the double quote in the SQL Query with \ (\")

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 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch