I want to check if a certain room is available between a start and end date. I am doing this with a webservice function. This function gives back a list with all the reservations of a given room. If this list is empty, the room is available, else it's not. For know I have this query. But it always gives back all my reservations.
SELECT * FROM ARTICLES_RESERVERING res
INNER JOIN ARTICLES_ZAAL roo ON res.ZAALID = roo.ID
WHERE roo.ID = @ZAALID
AND res.DATUM_BEGIN >= @DATUM_EINDE OR res.DATUM_EINDE <= @DATUM_BEGIN
Could anybody help ?