Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

Kiva
2009-05-11 09:50:58

Hi guy,

Thanks for your answer.

To find the date, I used a tJava with Calendar.add method and this solution works.

shong
2009-05-11 05:31:06

Hello
As tnewman and bluesin said.
"select now() from dual"
Please see my screenshot.

Best regards

        shong

bluesin
2009-05-08 23:10:04

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;

tnewman
2009-05-08 20:40:54

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

Kiva
2009-05-07 12:06:12

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.

Board footer

Powered by FluxBB