Hi all,
I am struggling a bit with this SQL statement. I have a table with two dates , collect and return. Now it is easy to test if one date falls outside collect and return by using not between. But what do I do if I need to test if two dates fall outside between collect and return. Example: “SELECT * FROM TBLBookings WHERE (BETWEEN :a AND :b) NOT BETWEEN collect AND return”. I get an error at the first between.
Basically not :a, :b or any date between :a or :b may be the same as collect or return or fall between them.
Any help will be appreciated
Thanks
I am struggling a bit with this SQL statement. I have a table with two dates , collect and return. Now it is easy to test if one date falls outside collect and return by using not between. But what do I do if I need to test if two dates fall outside between collect and return. Example: “SELECT * FROM TBLBookings WHERE (BETWEEN :a AND :b) NOT BETWEEN collect AND return”. I get an error at the first between.
Basically not :a, :b or any date between :a or :b may be the same as collect or return or fall between them.
Any help will be appreciated
Thanks