-
Need SQL to calculate the age of a member based on DOB and current date
I have a requirement to calculate the age of a member based on the Date of birth and Current date, and then classify that age into categories like Under 30, 31-40,41-50,51-60 and Above 60.
Can some one help me with this query?
-
You can use datediff function get different in years between two dates, then you will have to use case statement to put then in different bands
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|