Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Gabri11
Contributor
Contributor

take a value from a sql table and save it in a variable

Hi, I should extract a value from a table and save it in a variable and then use it in a subsequent query. I'm a beginner. Can someone good-hearted help me? 🙂

Labels (2)
12 Replies
akumar2301
Specialist II
Specialist II

Define schema in tMysql row where schema column name same as  query result column name.

 

 

during select use GlobalMap get

Gabri11
Contributor
Contributor
Author

I do not use mysql but a jdbc generic because the source is openedge

Anonymous
Not applicable

Hi,

 

     I understand that you are trying to get the value for the post mentioned below.

 

https://community.talend.com/t5/Design-and-Development/Where-clause-dynamic-postgresql-with-date/m-p...

 

Lets try to do it in slightly different way.

 

Step 1:- Create a context variable max_date with String data type

 

Step 2:- Assign the value from database to context variable as shown below. Make sure that your data from database is fetched in the format YYYYMMDD and converted to String. If you want the value in different format, make sure that the format is in sync everywhere.

0683p000009M27w.png

 

 

Now, you have the value in the context variable which can be used in the whole job. Please note that you can use the Global variables also. In that case, you need to assign the Global variable in String format as argument to your next post.

 

Hope it helped to resolve your issue 🙂

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂