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: 
_AnonymousUser
Specialist III
Specialist III

SQL + date filter

HI.
I a new taled user.
=)
i have this question: how to filter data from a table by a date.
===========================================================
esample:
My project read an oracle table and have to write a oracle table.
table1 ( source )
id ( number), surname (string), name ( string), birthday( date)
table2 (destination )
id ( number), surname (string), name ( string)
i have to ransfer all the record where the birthday is > .
===========================================================
I'm able to read the record and write them in the table, but i'm not able ti filter by the date.
someone can help me ?

TY

Gimmy
Labels (2)
1 Reply
Anonymous
Not applicable

You have successfully created an input component. Take al look at the query. You can edit the query and introduce changes. Assuming you have a context variable containing a date which should be used as filter.
Here an example which assumes you have a context variable containing a date called last_modified
"select
id,
name
from customers
where birthday > ('" + TalendDate.formatDate("yyyy-MM-dd", context.last_modified) +"' - 6 month)"

Yes it is a bit cumbersome but until Talend enables prepared statement parameters for normal input components we have to tweak the SQL it self.