Greetings Koha Community!

First-time poster here, I'm fairly new to Koha and SQL.  I've been trying to 
write a specific report with no luck. Here's what's happening:

We're updating series authorities for our fiction collection.  To start, I need 
to create a list of all our romance novels that have series fields (490, 8XX).  
This query returns the list of all our romance novels:

SELECT biblio.biblionumber, biblio.title
FROM biblio_metadata
JOIN biblio ON (biblio_metadata.biblionumber = biblio.biblionumber)
WHERE ExtractValue (metadata, '//datafield[@tag="092"]/subfield[@code="a"]') = 
'ROM'

The obstacle is trying to figure out what syntax to use to indicate the 
presence of a field (the contents of the field are irrelevant to this task.)  
I've tried various AND WHERE and AND EXISTS lines, but I'm fumbling around in 
the dark.  Can anyone point me in the right direction?  Thanks for your time 
and attention.

Regards,

Jason Vasché
Catalog Librarian
Round Rock Public Library
_______________________________________________
Koha mailing list  http://koha-community.org
[email protected]
https://lists.katipo.co.nz/mailman/listinfo/koha

Reply via email to