[Koha] Report error (SQL )

John Sterbenz jsterben at umich.edu
Fri Aug 4 09:24:54 NZST 2017


Hello Luis,

There was a big change in the way MARC data is handled in 17.05.  marcxml
is no longer in the biblioitems table--it is now biblio_metadata.metadata

If you're running 17.05, this would be a great place to start looking to
update your query.  If you're not on 17.05, I'm afraid I don't have any
ideas for you to follow.

For a report we run monthly (forgive any coding inefficiencies--I am
completely self-taught):


*OLD FORMAT:*

SELECT biblionumber
AS bibnumber
FROM
(SELECT biblionumber,
ExtractValue(*marcxml*,'//datafield[@tag="957"]/subfield[@code>="a"]')
AS sub1,
ExtractValue(*marcxml*,'//datafield[@tag="956"]/subfield[@code>="a"]') AS
sub2
FROM *biblioitems*) AS loaddate
WHERE sub1 = "201702"
AND sub2 = "Serials Solutions eBook record"



*NEW (17.05) FORMAT:*

SELECT biblionumber
AS bibnumber
FROM
(SELECT biblionumber,
ExtractValue(*metadata*,'//datafield[@tag="957"]/subfield[@code>="a"]')
AS sub1,
ExtractValue(*metadata*,'//datafield[@tag="956"]/subfield[@code>="a"]') AS
sub2
FROM *biblio_metadata*) AS loaddate
WHERE sub1 = "201702"
AND sub2 = "Serials Solutions eJournal record"



John

On Thu, Aug 3, 2017 at 4:50 PM, Katrin <katrin.fischer.83 at web.de> wrote:

> Hi Luis,
>
> where does it say the field is obsolete?
>
> Katrin
>
>
> On 03.08.2017 22:16, Luis Moises Rojas wrote:
>
>> Hello everybody.
>> We have an sql senteces to extract SUBTITLE
>> (ExtractValue(biblioitems.marcxml,
>> '//datafield[@tag="245"]/subfield[@code="b"]') AS "Subtitulo)  but now it
>> say this field is obsolete.
>>
>> Where is the subttile?
>>
>> Thanks
>>
>>
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>



-- 
-=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=- -=<*>=-
John E. Sterbenz, Jr.
Senior Associate Librarian
Manager, Technical Services, Collections, and Library Automation
700 East University Avenue
Kresge Hall, 4th Floor East
Suite K4511
Kresge Library Services
The University of Michigan
Ann Arbor, Michigan, USA 48109-1234

TEL: (734) 764-5746


More information about the Koha mailing list