开发者

sql-function to get lines including a certain date

开发者 https://www.devze.com 2023-03-07 15:27 出处:网络
I have an SQL table with columns like this: Person | Property 1 | Property 2 | ... | BEGIN-DATE | END-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
0

精彩评论

暂无评论...
验证码 换一张
取 消