Where are subtitles stored?
We migrated to Koha two years ago by importing MARC records from our old system. Recently I was asked to do a report which included both titles and subtitles. According to my mapping, this should be 245$a and 245$b mapped to biblio.title and biblio.subtitle, respectively. I find that there is nothing in any of the biblio.subtitle fields of the imported records. There is data in biblio.subtitle for the items we have added from within Koha after the import. I have checked the MARC records file we imported, and 245$a and 245$b are populated correctly. What puzzles me is that the OPAC shows the subtitles correctly for everything. Where would it be getting the data, if not from biblio.subtitle? Randy Wright Information Resource Steward Santa Barbara Botanic Garden Blaksley Library 1212 Mission Canyon Road Santa Barbara CA 93105 805-682-4726 x107 www.sbbg.org www.sbbgphotos.org
Hi Randy All marc info is xml-coded inside biblio_metadata table. For reporting them, you need to use an xml parser like Extractvalue(metadata, '//datafield[@tag="245"]/subfield[@code="a"]') Therefore an example of a mysal report might be SELECT DISTINCT CONCAT('<a href=\"/cgi-bin/koha/catalogue/ detail.pl?biblionumber=',biblionumber,'\">',biblionumber,'</a>') AS EditRecord, Extractvalue(metadata, '//datafield[@tag="245"]/subfield[@code="a"]') AS Title, Extractvalue(metadata, '//datafield[@tag="245"]/subfield[@code="b"]') AS Subtitle FROM biblio_metadata Regards Alvaro |----------------------------------------------------------------------------------------| Stay safe / Cuídate/ Reste sécurisé *7* Switch off as you go / Apaga lo que no usas / Débranchez au fur et à mesure. *q *Recycle always / Recicla siempre / Recyclez toujours P Print only if absolutely necessary / Imprime solo si es necesario / Imprimez seulement si nécessaire Le jeu. 1 oct. 2020 à 17:23, Randy Wright <RWright@sbbg.org> a écrit :
We migrated to Koha two years ago by importing MARC records from our old system. Recently I was asked to do a report which included both titles and subtitles. According to my mapping, this should be 245$a and 245$b mapped to biblio.title and biblio.subtitle, respectively. I find that there is nothing in any of the biblio.subtitle fields of the imported records. There is data in biblio.subtitle for the items we have added from within Koha after the import. I have checked the MARC records file we imported, and 245$a and 245$b are populated correctly. What puzzles me is that the OPAC shows the subtitles correctly for everything. Where would it be getting the data, if not from biblio.subtitle?
Randy Wright
Information Resource Steward Santa Barbara Botanic Garden Blaksley Library 1212 Mission Canyon Road Santa Barbara CA 93105
805-682-4726 x107
www.sbbg.org www.sbbgphotos.org _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Hi Randy, the subtitle aka 245$b is being populated front the actual marcxml record stored for each bib in the biblio_metadata table. Thus, in order to fetch the subtitle in your SQL report, you will need to pull it out of the marcxml data using the ExtractValue XML function in MySQL / MariaDB. If case you are not familiar with the syntax to use, the Koha SQL Reports library on the koha wiki has several examples of this. Cheers, Indranil On Fri, 2 Oct, 2020, 3:53 am Randy Wright, <RWright@sbbg.org> wrote:
We migrated to Koha two years ago by importing MARC records from our old system. Recently I was asked to do a report which included both titles and subtitles. According to my mapping, this should be 245$a and 245$b mapped to biblio.title and biblio.subtitle, respectively. I find that there is nothing in any of the biblio.subtitle fields of the imported records. There is data in biblio.subtitle for the items we have added from within Koha after the import. I have checked the MARC records file we imported, and 245$a and 245$b are populated correctly. What puzzles me is that the OPAC shows the subtitles correctly for everything. Where would it be getting the data, if not from biblio.subtitle?
Randy Wright
Information Resource Steward Santa Barbara Botanic Garden Blaksley Library 1212 Mission Canyon Road Santa Barbara CA 93105
805-682-4726 x107
www.sbbg.org www.sbbgphotos.org _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
The database fields could have been left empty if the framework that maps the values from the MARC record to the fields in biblio table wasn't in place or correct at the time of import. You can repopulate them by running the misc/batchRebuildBiblioTables.pl script on the server. --Ere Randy Wright kirjoitti 2.10.2020 klo 1.22:
We migrated to Koha two years ago by importing MARC records from our old system. Recently I was asked to do a report which included both titles and subtitles. According to my mapping, this should be 245$a and 245$b mapped to biblio.title and biblio.subtitle, respectively. I find that there is nothing in any of the biblio.subtitle fields of the imported records. There is data in biblio.subtitle for the items we have added from within Koha after the import. I have checked the MARC records file we imported, and 245$a and 245$b are populated correctly. What puzzles me is that the OPAC shows the subtitles correctly for everything. Where would it be getting the data, if not from biblio.subtitle?
Randy Wright
Information Resource Steward Santa Barbara Botanic Garden Blaksley Library 1212 Mission Canyon Road Santa Barbara CA 93105
805-682-4726 x107
www.sbbg.org www.sbbgphotos.org _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
-- Ere Maijala Kansalliskirjasto / The National Library of Finland
Err.. It was my change to add the subtitle field along a few others. You'll definitely need to run the script mentioned below to populate them. --Ere Ere Maijala kirjoitti 2.10.2020 klo 12.53:
The database fields could have been left empty if the framework that maps the values from the MARC record to the fields in biblio table wasn't in place or correct at the time of import. You can repopulate them by running the misc/batchRebuildBiblioTables.pl script on the server.
--Ere
Randy Wright kirjoitti 2.10.2020 klo 1.22:
We migrated to Koha two years ago by importing MARC records from our old system. Recently I was asked to do a report which included both titles and subtitles. According to my mapping, this should be 245$a and 245$b mapped to biblio.title and biblio.subtitle, respectively. I find that there is nothing in any of the biblio.subtitle fields of the imported records. There is data in biblio.subtitle for the items we have added from within Koha after the import. I have checked the MARC records file we imported, and 245$a and 245$b are populated correctly. What puzzles me is that the OPAC shows the subtitles correctly for everything. Where would it be getting the data, if not from biblio.subtitle?
Randy Wright
Information Resource Steward Santa Barbara Botanic Garden Blaksley Library 1212 Mission Canyon Road Santa Barbara CA 93105
805-682-4726 x107
www.sbbg.org www.sbbgphotos.org _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
-- Ere Maijala Kansalliskirjasto / The National Library of Finland
participants (4)
-
Alvaro Cornejo -
Ere Maijala -
Indranil Das Gupta -
Randy Wright