[Koha] MySQL to update dateaccessioned

Bernardo Gonzalez Kriegel bgkriegel at gmail.com
Fri Nov 23 12:29:50 NZDT 2012


On Thu, Nov 22, 2012 at 8:03 PM, Paul <paul.a at aandc.org> wrote:

> I am trying to update a bunch of various dates to 31 Dec. The following
> appears to be syntactically OK, finds all 1302 to be changed, but does not
> change them to 31 Dec.
>
> mysql> UPDATE items
> -> SET items.dateaccessioned=REPLACE(**items.dateaccessioned,'%','**
> 2011-12-31')
> -> WHERE blah blah blah;
> Query OK, 0 rows affected (0.04 sec)
> Rows matched: 1302 Changed: 0 Warnings: 0
>
> why are you using replace?
I think that

UPDATE items SET dateaccessioned = '2011-12-31' WHERE blah blah

will do the job.

Bernardo


More information about the Koha mailing list