You are not logged in.
Announcement
Unanswered posts
|
Hi guy,
Thanks for your answer.
To find the date, I used a tJava with Calendar.add method and this solution works.
Hello
As tnewman and bluesin said.
"select now() from dual"
Please see my screenshot.
Best regards
shong
You use the table name of dual when you want to select on literals or functions without accessing an actual table. "dual" is a dummy table operand, not sure how it'll work in Talend though...
Select now() from dual;
Hi,
The syntax for the NOW() stmt is :-
SELECT NOW() FROM table_name
I guess you could use any table in your db.
As for assigning to context variable, try TjavaRow like :-
if (row1.datetime !=null) {
context.var_name=row1.datetime;
}
HTH
Hi guy,
I have a problem with a job. I need to know the yesterday date to find a file for my job.
I would like use functions date of mysql like DATE_SUB but it doesn't work.
I use a tMysqlInput or a tMysqlRow but I have an error when I use the function NOW(). Indeed, talend use NOW() as a variable name and it doesn't work (logical)
How can I use these functions to create variable(s?) and use them in a tJava?
I post two screen shot for a better explaination.
Thanks for your help.