2
Answers

upcoming birthdays query

Rashid Khan

Rashid Khan

14y
3.7k
1
Hello Everyone.
i have query for upcoming birthday,
i want when user log in then on welcome page user can see upcoming birthday of next 10 days  from the current date of their contact. i wrote this

select FirstName,DOB from PersonalAddBook where month(DOB)=month(getdate())
 AND day(DOB)>=day(getdate()) order by DOB asc;

but the problem is this its only return same month's birthday result. like today is 27th April. and if my frnd's b'day is on 1st May then its not showing, i want,. query which always count 10 days from the current date and show. if any b'day is coming in tht 10 days period.
please update my query nd tell me how can i get the desired result.
Thanks


Answers (2)