Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello again, I have now a sql query , but it return 7 or 8 query instead of 5
And and my query is not returning a result, he return me only the full query
SELECT * FROM table where C_USER_A=(SELECT max(C_USER) as c_user FROM user WHERE name= 'this.name')
I want to execute the query , how should i do ?
String name; String resultat= ((String)globalMap.get("tOracleRow_2_QUERY"))+'(' + ((String)globalMap.get("tOracleRow_1_QUERY"))+')'; System.out.print(resultat);
this is my java code
Hi again,
What do you expect from the tJava component.
Remember this rule from the documentation:
"You can use a tJava component to integrate your custom Java code into a Talend program. It applies exclusively to the start of the generated code of the subjob: it will be executed first, but only once in the subjob. Normally, tJava has no input or output data flow and is used as a separate subjob."
What is the result from the "print" operation?
SELECT * FROM MY_TABLE where MY_TABLE.my_row =(SELECT max(USER.rows) as rows FROM USER WHERE USER.name = 'name1') SELECT * FROM MY_TABLE where MY_TABLE.my_row =(SELECT max(USER.rows) as rows FROM USER WHERE USER.name = 'name2') SELECT * FROM MY_TABLE where MY_TABLE.my_row =(SELECT max(USER.rows) as rows FROM USER WHERE USER.name = 'name3') SELECT * FROM MY_TABLE where MY_TABLE.my_row =(SELECT max(USER.rows) as rows FROM USER WHERE USER.name = 'name4') SELECT * FROM MY_TABLE where MY_TABLE.my_row =(SELECT max(USER.rows) as rows FROM USER WHERE USER.name = 'name5') SELECT * FROM MY_TABLE where MY_TABLE.my_row =(SELECT max(USER.rows) as rows FROM USER WHERE USER.name = 'name6') SELECT * FROM MY_TABLE where MY_TABLE.my_row =(SELECT max(USER.rows) as rows FROM USER WHERE USER.name = 'name7') SELECT * FROM MY_TABLE where MY_TABLE.my_row =(SELECT max(USER.rows) as rows FROM USER WHERE USER.name = 'name8') SELECT * FROM MY_TABLE where MY_TABLE.my_row =(SELECT max(USER.rows) as rows FROM USER WHERE USER.name = 'name9')
The java print return this
In my Job, I want to get the user.rows and adding this to an other sql query to insert an element to my DB
I don't know how can I see the result of my query, I tried with tOracleInput but he say me Error "ORA-01722"
Hi,
Does this help?
If so, thank's to mark your case as solved (Kudos also accepted).