Re: Update Year of Date Field using sql statement

2003-01-05 Thread Daniel Kasak
Hakkan Lui wrote: >Dear all, > >How can I change the year of the date field using sql statement? > >It means something like: >update table1 set year(f1) = '2002' where year(f1) = '2003'; > > If you have a field for _just_ the year, you can use the above statement. If you have the year embedded i

Re: Update Year of Date Field using sql statement

2003-01-05 Thread Paul DuBois
At 22:56 -0500 1/5/03, Bhavin Vyas wrote: I don't think there is a way to do that. Unless some one says there is(and tells us how to do it), I guess your only option is to write a script to do that. Here's one way: UPDATE table1 SET f1 = CONCAT('2002','-',MONTH(f1),'-',DAYOFMONTH(f1)) WHERE YEA

Re: Update Year of Date Field using sql statement

2003-01-05 Thread Bhavin Vyas
I don't think there is a way to do that. Unless some one says there is(and tells us how to do it), I guess your only option is to write a script to do that. Regards, Bhavin. - Original Message - From: "Hakkan Lui" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 05, 2003 1