Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i should insert a result of query in another query .
my problem is the first query has many results and i should try the results in condition clause where (like)
example:
the first query results are for example (1,2,3)
the second query is like that
select code from codes where code like'%1%' and code like'%2% and code like'%3%'
i should have a dynamic query and i don't know which component i will use
thanks for the response
i have executing the job but there is an error the query is not perfect !
it's like that:
select code_grille_talend from code where code_grille_talend like'%2%'and
select code_grille_talend from code where code_grille_talend like'%1%'and
it can't execute in the TSqliteinput error
that's why it's should be like:
select code_grille_talend from code where code_grille_talend like'%2% and code_grille_talend like'%1%'
Idea Please !!
You could use tJavaFlex to build your Query and then use the Query in TOracleInput
answer from @uganesh is correct,
just need to add " and "
and logic for handle single row result - avoid " and " at the end
thanks for solution
but i don't have results because i need to that query have all conditions where clauses like for example
if code is like '%1%' and code is like '%2%' and code is like'%3%'
i need to have results for who has all condition in the query . i should have a dynamic query for this problem .
this is my job to explicate more the problem
any ideas for the job !
thanks for response
i'm beginner in talend
how to insert this dynamic query from tjavaflex to tdbinput dynamically!
my job is correct or no?
if i execute my job i have 0 rows ?
because @uganesh already put text into variable
just connect subjob where you prepare final query to the next subjob (where you run it) by OnSubJobOk gtrigger
and instead of any SQL code put
(String)globalMap.get("Query")
thank you
i try it but i don't have the results . this are capture of my subjob and final job what's wrong in this job !
thanks
subjob in Talend it is not only a child job (which you run with tRunJob)
it is just a group of components connected by dataflows
Child job do not return variables to parent job by default
put all in the same Job, just in 2 subjob