Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Talend 6.0
Linux 6.5
If you look at the Talend Help Center doc at https://help.talend.com/search/all?query=Handling+Lookups
you will see an example of using a global variable in a lookup. This is exactly what I want to do but I cannot get the SQL
to parse correctly as described in the Help Center document.
It uses as an example SQL
"Select * from person where id=" (Integer)globalMap.get("id")"
but when I enter my lookup SQL as a Built-In Query Type (see below) I get syntax errors - is the doc incorrect or is it my SQL?
"select PayCode, PayId
from Payment
where MaximumPay >= " (Integer)globalMap.get("Pay") "
and MinimumPay <= " (Integer)globalMap.get("Pay")"
My error message is:
String literal is not properly closed by double-quote
Added notes: Tried \"Pay\" with no luck. "Pay" is a global variable set with tSetGlobalVar prior to the lookup and the Lookup Model is set to "Reload at each row".
"select PayCode, PayId
from Payment
where MaximumPay >= " + (Integer)globalMap.get("Pay") + "
and MinimumPay <= " + (Integer)globalMap.get("Pay")