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: 
Anonymous
Not applicable

[resolved] Passing global var of date type through tFlowTolterate to SQL query?

TOS 3.2.1, Java Project
I am having difficulty passing global var of date type to SQL query.
Here is sql and I how I thought it should work ...
"select sl_date, sl_store, sl_cat, sl_price
from sales2
where sl_date = '((java.util.Date)globalMap.get("dateKey"))'"
but ... I got errors
- The method ExecuteQuery(String) in the type Statement is not applicable for the for the arguments (String, String)
- Syntax Error on token "dateKey",, expected
This global variable is created by tFlowTolterate component, where I specified "dateKey" variable.
Can you pass date type through tFlowTolterate further on MysqlInput control?
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello guy
try
"select sl_date, sl_store, sl_cat, sl_price
from sales2
where sl_date = '"+((java.util.Date)globalMap.get("dateKey"))+"'"

Best regards
shong

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hello guy
try
"select sl_date, sl_store, sl_cat, sl_price
from sales2
where sl_date = '"+((java.util.Date)globalMap.get("dateKey"))+"'"

Best regards
shong
Anonymous
Not applicable
Author

Shong, thanks bro!!
I guess those + signs are concatenation signs? I don't know anything Java, looks like I'll have to invest into learning it.
Anonymous
Not applicable
Author

Hello
I guess those + signs are concatenation signs?

yes! 0683p000009MA9p.png
Best regards

shong