[Koha] SQL Query - Items with a Local Cover Image

Craig Butosi craig.butosi at rcmusic.ca
Sun Mar 27 06:49:43 NZDT 2016


Hi all,

Koha 3.22 on Ubuntu 14.04 LTS (package install)

I`m trying to write a basic SQL query to pull all items with a local cover image. I`m running Coce now, so I no longer need to upload local cover images to Koha. I need to identify these records so I can remove their images. I have a basic query:

SELECT biblionumber FROM biblioimages
WHERE biblionumber AND imagefile IS NOT NULL

which works, but only returns the biblionumber column from the biblioimages table. I`d like to add a call number column from the items table to this report. I`ve tried this

SELECT biblionumber
FROM biblioimages
LEFT JOIN items
ON biblioimages.biblionumber=items.itemcallnumber
WHERE biblionumber AND imagefile IS NOT NULL

But I get an ambiguity error, and I don`t quite understand how to apply an alias to overcome this. The error is as follows:




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<https://webmail.rcmusic.ca/owa/redir.aspx?C=b481823b299d45ee94b0016389bb76e9&URL=http%3a%2f%2fwww.rcmusic.ca%2f>


Note: This email message and any attachments are intended only for the use of the individual to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the recipient of this email is not the intended recipient (or the employee or agent responsible for delivering the email to the intended recipient), you are hereby notified that any review, dissemination, distribution or copying or other use of this message is strictly prohibited. If you have received this communication in error, please notify the sender immediately by return email and delete this message and attachments from your system, thank you.


More information about the Koha mailing list