check availability of a room with SQL

后端 未结 2 938
予麋鹿
予麋鹿 2021-01-25 04:55

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 reservation

2条回答
  •  悲&欢浪女
    2021-01-25 05:08

    AND has higher precedence than OR.

    Change the last line to:

    AND (res.DATUM_BEGIN >= @DATUM_EINDE OR res.DATUM_EINDE <= @DATUM_BEGIN)
    

提交回复
热议问题