here is a sample query which i used for checking the rooms which are not available, the query will return the unavailable rooms
SELECT roomno FROM tbl_ReservedRooms WHERE ((fromdate BETWEEN @checkindate AND @checkoutdate )
OR (todate BETWEEN @checkindate AND @checkoutdate))
AND status = 'Active'