Hi there,
I want to create a simple web service which receives a "contract date" as one of the request parameters.
The service shall then simply read contracts from a contract table where the above mentioned contract date is greater or equal to the ones in the database.
In other words:
select * from contracts where contract_date < "contract date"
How do I do that in talend?
How can I use request parameters of a web service call as filter parameters of a SQL where clause?
Thanks
Matt
Hi Matt,
After receiving parameter from web service, assign that value to context variable... and then use that context variable in your sql query..
"select * from contracts where contract_date < "+contex.contract date
Try this... Be careful about format and datatype conversion using proper enclosures.. Use print statement to ensure correctness of the query.
vaibhav
Hi Matt,
After receiving parameter from web service, assign that value to context variable... and then use that context variable in your sql query..
"select * from contracts where contract_date < "+contex.contract date
Try this... Be careful about format and datatype conversion using proper enclosures.. Use print statement to ensure correctness of the query.
vaibhav