Discussion:
[Koha] REPORT 100 AND 700 MARC TAG
Hans Manrique
2018-10-04 08:53:11 UTC
Permalink
Hello everyone,

I would like to have a report of only fields 100 and 700 in a single
column. I'm a student and I do not understand much about sql, but I've
managed to get a 100 report through ExtractValue syntax queries (marcxml,
xpath). But I do not know how to get one of the fields 100, 700 in a single
report and in a column. Is that possible?

Hans Manrique
_______________________________________________
Koha mailing list http://koha-community.org
***@lists.katipo.co.nz
https://lists.katipo.co.nz/mailm
Caroline Cyr-La-Rose
2018-10-04 13:36:08 UTC
Permalink
Hi Hans,

I'm no SQL expert either, but I usually use CONCAT_WS to have the 100
and 700 authors appear in the same column.

Also, check your mappings in Administration > Koha to MARC mapping. You
may be able to use biblio.author instead of ExtractValue for the 100 field.

So something like

SELECT CONCAT_WS(biblio.author, ExtractValue(metadata,
'//datafield[@tag="700"]/subfield[@code="a"]')) FROM biblio_metadata
JOIN biblio USING (biblionumber)

(metadata is used instead of marcxml in more recent versions of Koha)

Good luck!

Caroline

Caroline Cyr La Rose, M.S.I.
Bibl. prof. / Chargée de la formation et du soutien

Tél.  : 1 (833) 465-4276
caroline.cyr-la-***@inLibro.com <mailto:caroline.cyr-la-***@inLibro.com>

inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
Post by Hans Manrique
Hello everyone,
I would like to have a report of only fields 100 and 700 in a single
column. I'm a student and I do not understand much about sql, but I've
managed to get a 100 report through ExtractValue syntax queries (marcxml,
xpath). But I do not know how to get one of the fields 100, 700 in a single
report and in a column. Is that possible?
Hans Manrique
_______________________________________________
Koha mailing list http://koha-community.org
https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org
***@lists.katipo.co.nz
https://list
Paul Hoffman
2018-10-04 14:36:13 UTC
Permalink
Or like this, which might (or might not!) be more efficient since it
only resorts to ExtractValue if the author is NULL:

SELECT IF(b.author IS NULL,
ExtractValue(m.metadata, '//datafield[@tag="700"]/subfield[@code="a"]'),
b.author
)
FROM biblio b INNER JOIN biblio_metadata m USING (biblionumber);

Paul.
Post by Caroline Cyr-La-Rose
Hi Hans,
I'm no SQL expert either, but I usually use CONCAT_WS to have the 100 and
700 authors appear in the same column.
Also, check your mappings in Administration > Koha to MARC mapping. You may
be able to use biblio.author instead of ExtractValue for the 100 field.
So something like
SELECT CONCAT_WS(biblio.author, ExtractValue(metadata,
biblio USING (biblionumber)
(metadata is used instead of marcxml in more recent versions of Koha)
Good luck!
Caroline
Caroline Cyr La Rose, M.S.I.
Bibl. prof. / Chargée de la formation et du soutien
Tél.  : 1 (833) 465-4276
inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
Post by Hans Manrique
Hello everyone,
I would like to have a report of only fields 100 and 700 in a single
column. I'm a student and I do not understand much about sql, but I've
managed to get a 100 report through ExtractValue syntax queries (marcxml,
xpath). But I do not know how to get one of the fields 100, 700 in a single
report and in a column. Is that possible?
Hans Manrique
_______________________________________________
Koha mailing list http://koha-community.org
https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org
https://lists.katipo.co.nz/mailman/listinfo/koha
--
Paul Hoffman <***@flo.org>
Software Services Manager
Fenway Library Organization
550 Huntington Ave.
Boston, MA 02115
(617) 442-2384
_______________________________________________
Koha mailing list http://koha-community.org
***@lists.katipo.co.nz
h
Loading...