[Koha-devel] Losing biblio.author in 3.8.5

Christopher Nighswonger chris.nighswonger at gmail.com
Thu Nov 1 02:44:16 CET 2012


On Wed, Oct 31, 2012 at 8:12 PM, Paul <paul.a at aandc.org> wrote:

>  At 02:27 PM 10/31/2012 -0600, Mike Hafen wrote:
>
> Would an SQL Update statement be more effective here?  Like:
> UPDATE biblio SET author =
> ExtractValue(marcxml,'//datafield[@tag="100"]/subfield[@code>="a"]') WHERE
> author IS NULL
>
>
> Many thanks for the suggestion, but I ran into problems -- I think it's to
> do with mixing a straightforward 'table/column' as in biblio.author with an
> 'ExtractValue' from a different table.
>
> Here's your suggestion:
>
> mysql> UPDATE biblio SET author =
> ExtractValue(marcxml,'//datafield[@tag="100"]/subfield[@code>="a"]') WHERE
> author IS NULL;
> ERROR 1054 (42S22): Unknown column 'marcxml' in 'field list'
>

IIRC you cannot use ExtractValue with UPDATE, INSERT, or SELECT INTO
statements. Somewhere back in the list archives we discussed this, but
neither Google nor I seem to be able to locate it at the moment.

Kind Regards,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20121031/191c7753/attachment.htm>


More information about the Koha-devel mailing list