cancel
Showing results for 
Search instead for 
Did you mean: 

Update SQL statement, date possibilities

michel_dekimpe
Participant
0 Kudos

All,

Is it possible to format the date in the update sql statement of the sender JDBC adapter ?

the statement curdate() returns the date in this format 09-02-04.

But, I would like to have it in this format 20090204.

this is my update statement

UPDATE table SET status = 'X', date = curdate()

Anybody knows how to do this or via something else than curdate()

Michel

Accepted Solutions (0)

Answers (4)

Answers (4)

michel_dekimpe
Participant
0 Kudos

Hi Kshitij,

It's not a UDF and it's not in a mapping.

It's in the update sql statement of the communication channel of the sender JDBC adapter.

(on the processing tab)

I don't understand what you mean by using a dummy field.

Can you declare a dummy field in the update sql statement ?

Thanks for your help.

Regards, Michel

Former Member
0 Kudos

Hi Michel,

I have provided a way in my previous message. I could work that way.

regards,

Kshitij

michel_dekimpe
Participant
0 Kudos

Hi,

curdate() is a command that returns the system date and is in the format 09-02-04

we would like to have this in the format 09-02-04

any idea's ?

Regards, Michel

Former Member
0 Kudos

Hi Michel,

I am sorry i misunderstood the question.. how are you getting the data from curdate() may i ask. What exactly is curdate()?

Is it a field in the database that you are retrieving?

What you could do is create another dummy field and maitain the current date in that field, in the format you want it to. Then you could use that field in the update statement as tableName.fieldName.

Use this to manage your date checks. Only that you would have to modify the date in the database every day.

Regards,

Kshitij

Edited by: Kshitij Sharma on Feb 4, 2009 9:31 AM

Edited by: Kshitij Sharma on Feb 4, 2009 9:36 AM