WHEN D.Age BETWEEN 30 AND 39 THEN '30-39' WHEN D.Age BETWEEN 20 AND 29 THEN '20-29' SELECT DATEDIFF( year, BirthDate, GETDATE()) AS, Gender FROM #Age ORDER BY BirthDate, Gender ![]() ![]() I have a select statement in front of your solution to check the values.ĬREATE TABLE #Age( PersonID integer IDENTITY(1,1), ![]() I tried a quick test and I am not seeing your solution work correctly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |