Answers for "calculate birthday in sql"

SQL
0

Monthly Birthday SQL Query

SELECT c.name
FROM cust c
WHERE (
    MONTH(c.birthdate) = MONTH(@suppliedDate)
    AND DAY(c.birthdate) = DAY(@suppliedDate)
) OR (
    MONTH(c.birthdate) = 2 AND DAY(c.birthdate) = 29
    AND MONTH(@suppliedDate) = 3 AND DAY(@suppliedDate) = 1
    AND (YEAR(@suppliedDate) % 4 = 0) AND ((YEAR(@suppliedDate) % 100 != 0) OR (YEAR(@suppliedDate) % 400 = 0))
)
Posted by: Guest on July-28-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language