The following is a case statement that *should* produce identical results:ĬASE WHEN t1.date BETWEEN '21Mar2000' AND '19Apr2000' THEN 'Aries' It would work in much the same way as the method Chris described above but does not require the creation of a format. Mdy(month(date),day(date),2000) as sign format=sign.Īnother way to go about this would be to populate a calculated column using a case statement. * that don't span the calendar boundary */ * split Capricorn to make two valid ranges */ * SAS format for zodiac signs in a given year */ format in the column properties.įollowing: complete program that shows it in action. I used Year 2000 because it was a leap year and accounts for Feb 29. In the Query Builder, compute a new column based on the date value, with the month, day, and a fixed year. Zodiac signs don't change from year-to-year (do they?). That's why you need to recode the dates for use with the format - take the Year out of the equation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |