Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Talend community,
For a query i need the last_load datetime.
i did this using the following: tmssqlinput-> tcontextload. This works as expected
The issue im facing is that the where statement in the query below does not get the correct value from the contextload.(if i copy and paste the value into the where statement it works as expected)
Am i missing a step in the process, or is the query not written right?
Can you post a screenshot of your job? The flow of components is quite important when working with changing context variables. We need to see where the context variable value is changed and when the component using it is used. I suspect that your query has already been fired before the context variable value is set. By the way, you do not need to cast context variables. I assume you have set it as a String. As such, it is fine without the casting.
This is how the job looks at the moment
Hi Henkiiee,
I guess single quote vs double quote is the problem...Talend looks for a " where as DB editors can work with a single quote('). In addition just ensure that your query when handed over as Dynamic SQL is in line with the underlying DB engine, for it to understand and execute.
Can you show your query in your DB component? You are showing it in another tool.