Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

CRM Dynamics Onpremise Get Next 7 Days Birthday Data in SQL

$
0
0

I have Date of birth field in contact table where Year part is defaulted to 2296 for all the records.

Now the requirement is to get Next 7 days records from current date using SQL for reporting.

How to write SQL query to get the desired result?

Key part to notice here is year set to default value 2296 for all rows. And this was done for compliance reason.

I had 3 requirements- 1. Today's Birthday - Select Id from tableA where Day(dob)=Day(GetDate()) And Month(dob)= Month(GetDate())

This Month's Birthday - Select Id from tableB where Day(dob)>=Day(GetDate()) And Month(dob)= Month(GetDate())

I am really stuck with the 3rd requirement which I am posting in my original post.


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images