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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
HJlassi1619437866
Contributor
Contributor

Invalid SQL statement or JDBC escape

Hello everyone,

I hope you're doing well,

I'm having an error in reading a string global map variable in a query clause

I get this error every time i ran my job "tdbInput 10 Invalid SQL statement or JDBC escape, terminating ''' not found"

0695b00000L0oFUAAZ.png

0695b00000L0oGIAAZ.png

here i get my string, than i just use a "globalMap.put("SERVICE_EMAIL", input_row.SERVICE_EMAIL);" in "tJavaRow"

Than i try to use it in another tdbinput (Microsoft Sql Server)

0695b00000L0oHQAAZ.png

And i get this error "tdbInput 10 Invalid SQL statement or JDBC escape, terminating ''' not found"

Have anyone face it before ?

I'll appreciate your help, thank you.

Labels (2)
1 Reply
MattE
Creator II
Creator II

The problem isn't with the global variable it is that your SQL statement is incomplete. You need to wrap the string in single quote

 

"...where lower(b.[eme_email]) in ('"+(String)globalMap.get("service_email)+"')"