SQL converting number of days to weeks

Viewed 2989

I have a SQL table with a column that says number of days, and contains entries like 23, 26, 45, etc... I am trying to convert each entry to a "week number". In essence, what I mean is that if my day entry is between 0 and 6, then, this is Week 1, if it is 7 and 13, then this is Week 2, 14 and 20, week 3, etc... Is there an "efficient" way to do this in SQL?

Thanks. Thomas.

2 Answers
Related