calculating time range values - 06-18-2012 , 09:31 AM
can someone help me with this? I am trying to create a computed column by calculating time range but it gives me errors with all the numbers assignedin the 'between' assignment. It seems like the code structure is wrong BUT i cant figured it out. If I do a select with the convert assignment typecome out in that format.
thanks for any help,
jjkgr (AT) hotmail (DOT) com
ALTER TABLE [dbo].[aidsdata] ADD GROUP_TIME_SHIFT AS
WHEN convert(time(0), DATE_CALL, 108) between 07:00:00 and 14:59:59 then '1st Shift'
WHEN convert(time(0), DATE_CALL, 108) between 15:00:00 and 22:59:59 then'2nd Shift'
when convert(time(0), DATE_CALL, 108) between 23:00:00 and 06:59:59 then'3rd Shift'