Excluding a ccode in a report
Hi everyone- I'm wanting to run a report for a particular itype in our collection but exclude a certain ccode that exists within the itype. So, I want a report WHERE items.itype='LKBK' but not items.ccode='LKIX'. I've tried a few different ways to express the "not" part, but nothing I tried worked. Could anyone tell me the correct SQL wording to do this? TIA ~Joy Joy M. Banks Catalog Librarian Roux Library Florida Southern College 111 Lake Hollingsworth Dr. Lakeland, FL 33801 (863)680-4736 jbanks@flsouthern.edu
Have you tried <> instead of = Susan Bennett ILS System Administrator Geauga County Public Library 440 286-6811 x 125 440 286-7419 FAX 2009/10/9 Banks, Joy M <jbanks@flsouthern.edu>
Hi everyone-
I’m wanting to run a report for a particular itype in our collection but exclude a certain ccode that exists within the itype. So, I want a report WHERE items.itype=’LKBK’ but not items.ccode=’LKIX’. I’ve tried a few different ways to express the “not” part, but nothing I tried worked. Could anyone tell me the correct SQL wording to do this?
TIA
~Joy
Joy M. Banks
Catalog Librarian
Roux Library
Florida Southern College
111 Lake Hollingsworth Dr.
Lakeland, FL 33801
(863)680-4736
jbanks@flsouthern.edu
_______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
This should work - in theory : WHERE items.itype=’LKBK’ AND items.ccode NOT LIKE ’LKIX’. 2009/10/9 Banks, Joy M <jbanks@flsouthern.edu>:
Hi everyone-
I’m wanting to run a report for a particular itype in our collection but exclude a certain ccode that exists within the itype. So, I want a report WHERE items.itype=’LKBK’ but not items.ccode=’LKIX’. I’ve tried a few different ways to express the “not” part, but nothing I tried worked. Could anyone tell me the correct SQL wording to do this?
TIA
~Joy
Joy M. Banks
Catalog Librarian
Roux Library
Florida Southern College
111 Lake Hollingsworth Dr.
Lakeland, FL 33801
(863)680-4736
jbanks@flsouthern.edu
_______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Nicole wrote: This should work - in theory : WHERE items.itype=’LKBK’ AND items.ccode NOT LIKE ’LKIX’. It did indeed work. Thank you so much! ~Joy
participants (3)
-
Banks, Joy M -
Nicole Engard -
Susan Bennett