Created
October 15, 2020 06:41
-
-
Save xmorave2/51fdadf88e261e18834ffb5553691917 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT b.title, | |
ExtractValue(bm.metadata, '//datafield[@tag="787"]/subfield[@code="t"]') AS 787t, | |
ExtractValue(bm.metadata, '//datafield[@tag="787"]/subfield[@code="g"]') AS 787g, | |
CONCAT_WS("", "<a class='btn btn-default btn-xs' href='/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=", b.biblionumber, "'><i class='fa fa-pencil'></i> Upravit záznam</a>") as Upravit | |
FROM biblio b | |
JOIN biblio_metadata bm ON b.biblionumber = bm.biblionumber | |
WHERE ExtractValue(bm.metadata, '//datafield[@tag="787"]/subfield[@code="t"]') != '' | |
AND ExtractValue(bm.metadata, '//datafield[@tag="787"]/subfield[@code="g"]') NOT REGEXP '^[[:digit:] ]+$' | |
ORDER BY 787g DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment