Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'have difficult to do it.
I have the first query "select max(date) from tab1". That result is necessary for the second query because will be part of conditions.
I want use the max(date) to select the record from tab2 like this:
"select * from tab2 join... where tab1.max(date) > tab2.max(date)"
How I can do it? I would use context variables or variables in tmap... help 😞 😞 😞 😞
Hi, I'have difficult to do it.
I have the first query "select max(date) from tab1". That result is necessary for the second query because will be part of conditions.
I want use the max(date) to select the record from tab2 like this:
"select * from tab2 join... where tab1.max(date) > tab2.max(date)"
How I can do it? I would use context variables or variables in tmap... help 😞 😞 😞 😞
You can store the result of the first query to a context variable, and use this variable in the other query. For example:
tMysqlInput1--main--tJavaRow
|
onsubjobok
|
tMysqlInput2--main--tLogRow
on tJavaRow:
context.date=input_row.max_date_column;
on tMysqlInput2: write the query like this:
"select * from tab2 join... where tab1.max("+context.date+") > tab2.max("+context.date+")"
How i can store the query result to a context variable. I want see the step.
I have that screen :
How i can store the query result to a context variable. I want see the step.
I have that screen :
I have showed you the job design as below:
tMysqlInput1--main--tJavaRow
|
onsubjobok
|
tMysqlInput2--main--tLogRow
on tJavaRow:
context.date=input_row.max_date_column;
//date is a context variable. If you have any troubles to get it works, please upload a screenshot of your job.
Best regards
Shong