Search
 
SCRIPT & CODE EXAMPLE
 

SQL

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))
)
Comment

PREVIOUS NEXT
Code Example
Sql :: apex call duration 
Sql :: why mssql rds is using more than 95 memory pool 
Sql :: add two days to current date in sql when creating tables 
Sql :: SQL Remove Primary Key Constraint - SQL Server, Oracle 
Sql :: create dabase psql 
Sql :: ring SQLite sqlite_init 
Sql :: oracle sql how to overcome 999 limit for IN 
Sql :: oarcale list objects 
Sql :: how to write query to to display record having maximum value 
Sql :: update user mysql 
Sql :: edit shchima table in sql 
Sql :: utiliser sql ligne de commande 
Sql :: flashback in bigquery 
Sql :: How to Group by and concatenate arrays with all columns in PostgreSQL 
Sql :: multiple value select mysql 
Sql :: sql select upcoming birthdays 
Sql :: https://stackoverflow.com/questions/52997573/how-to-connect-to-sql-database-with-react 
Sql :: how to fetch first 10 rows in sql 
Sql :: phpmyadmin access denied 
Sql :: oracle temp tablespace size 
Sql :: docker mysql connection refused 
Sql :: How to Remove milliseconds from Date time 
Sql :: kill mysqld_safe process mariadb 
Csharp :: unity reset scene 
Csharp :: c# sleep 
Csharp :: unity how to get y value 
Csharp :: c# exit console 
Csharp :: Debug raycasthit2d unity 
Csharp :: convert base64 string to string c# 
Csharp :: Animator.GotoState: State could not be found 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =