Advertisement
Guest User

Untitled

a guest
Dec 5th, 2012
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. SELECT DATE_FORMAT(items.datelastseen, '%d/%m/%Y') as 'Date Last Seen', (TO_DAYS(curdate())-TO_DAYS(items.datelastseen)) AS 'Days not seen for', items.itype as 'Item Type', items.itemcallnumber, items.barcode, biblio.title, biblio.author
  2. FROM items
  3. LEFT JOIN biblio ON (items.biblionumber=biblio.biblionumber)
  4. WHERE (TO_DAYS(curdate())-TO_DAYS(items.datelastseen)) > '3'
  5. AND LEFT(items.itemcallnumber,3) NOT IN ("RES","REL")
  6. ORDER BY items.datelastseen DESC, biblio.title ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement