Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'would store the result of query in variable and use this variable in new query.
For example:
query: select max(a) from table
tMysqlInput-> in context variable.
I define context variable in this way:
wrong I ?
Thnx at all
JoRoesecke wrote:
No need to use a context for this. You can achieve this by using e.g. tOracleInput/tMySqlInput/... --> tFlowToIterate --> tOracleInput/tMySqlInput/... --> (everything else you want to do). The first input represents your query posted above (select max(a) from table).
In tFlowToIterate you convert the input into a global variable which you can use in your next input like this:
"select XYZ from TABLE2 WHERE COLUMN = " + ((String)globalMap.get("a"))
(assuming that you named the column "a" in the schema of the first input and that it is of a numeric type).
rhall_2.0 wrote:
Click on the "row1" link. Take a look at the schema. The tFlowToIterate will save the column data to the globalMap using the following format....
[rowname].[columnname]
So if your row1 link has a column called "myColumn", the tFlowToIterate will save it to a key of "row.myColumn". It is case sensitive.
So your query would be...
"select * from table2 where column_date >"+((String)globalMap.get("row1.myColumn"))