sql-function to get lines including a certain date
I have an SQL table with columns like this:
Person | Property 1 | Property 2 | ... | BEGIN-DATE | END-DATE
I'd like to get all Information that are valid on a certain date.
Is there a special SQL-Function (like BETWEEN
or OVERLAPS开发者_如何学JAVA
) checking if BEGIN-DATE < DATE < END-DATE
? (Somehow the opposite of BETWEEN
.)
Thank you!
SELECT *
FROM Table
WHERE getdate() between BEGIN-DATE and END-DATE
精彩评论