Hello,
SELECT nr FROM objects WHERE nr NOT IN ( SELECT objnr FROM bookings WHERE (('20081212' > date1) AND ('20081212' <= date2)) OR (('20081210' < date2) AND ('20081210' >= date1)) OR (('20081210' <= date1) AND ('20081212' >= date2)) )
was für einen Datentyp haben denn deine Date-Spalten? Das Stringformat erscheint mir erstens suboptimal und ist zweitens eine häufige Erklärung für Probleme mit Abfragen.
MfG
Rouven
--
-------------------
sh:| fo:} ch:? rl:( br:& n4:{ ie:| mo:} va:) js:| de:] zu:| fl:( ss:) ls:& (SelfCode)
Friendships are like back yard gardens. We always mean to tend to them, we just seem to put to put them off until next week. -- Christian Clemenson as Jerry Espenson in Boston Legal: "Patriot Acts"
-------------------
sh:| fo:} ch:? rl:( br:& n4:{ ie:| mo:} va:) js:| de:] zu:| fl:( ss:) ls:& (SelfCode)
Friendships are like back yard gardens. We always mean to tend to them, we just seem to put to put them off until next week. -- Christian Clemenson as Jerry Espenson in Boston Legal: "Patriot Acts"