I need an SQL to fetch records of people whose birthdays are approaching in the next x days. I do not want to use multiple conditions for month and year (I can sql it by checking 3 conditions - current month=birthmonth, currentmonth+1=birthmonth,
currentmonth=12 and birthmonth=1). I need to use a simple statement like current_yeared_birthdate - currentdate between 0 and 7
The database is sqlserver/mysql/access
How do I do it?
Start Free Trial