SQL Help - Add barcode column to SQL query that searches subject keywords
Hi all,
I'm trying to get the barcodes column from the items database to display on the results page after running the following SQL query:
SELECT CONCAT('<a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber= ',biblionumber,'\">',biblionumber,'</a>') AS bibnumber, lcsh FROM (SELECT biblionumber, ExtractValue(marcxml,'//datafield[@tag="690"]/subfield[@code>="a"]') AS lcsh FROM biblioitems) AS subjects WHERE lcsh LIKE <<Enter keyword surrounded BY %>> WHERE biblionumber.biblionumber=items.barcode
The above I found on the Koha SQL library, but this query only displays
I think will work for you: SELECT CONCAT('<a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber= ',biblionumber,'\">',biblionumber,'</a>') AS bibnumber, lcsh,* barcode* FROM (SELECT biblionumber, *barcode*, EXTRACTVALUE(marcxml,'//datafield[@tag="690"]/subfield[@code>="a"]') AS lcsh FROM biblioitems LEFT JOIN items USING(biblionumber)) AS subjects WHERE lcsh LIKE <<Enter keyword surrounded BY %>> the biblionumber and keyword query results in 690a. I'd like to add the barcodes column to the report. Can't seem figure out how to do this in this query. Help, please :)
Many thanks!
C
Craig Butosi, MA, MLIS, B Mus (Hons.) LIBRARY SERVICES MANAGER the royal conservatory TELUS Centre for Performance and Learning 273 Bloor Street West Toronto, ON M5S 1W2 416.408.2824 x338 www.rcmusic.ca<http://www.rcmusic.ca/
-- Jorge de Cardenas | Head Systems Administrator 3512 Darrow Road, Stow, OH 44224 330 688-3295, ext 106 | FAX 330 688-0448 | www.smfpl.org | <http://www.facebook.com/SMFPL> <http://twitter.com/smfpl> <http://pinterest.com/smfpl/boards> If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the institution.
participants (1)
-
Jorge de Cardenas