Friday, August 29, 2014

Adding a Dollar $ to calculation from a CASE statement


case
when (tblbookin.bookindt between '2013-10-01 00:00:00.000' AND '2014-09-30 23:59:59.999')
then '$'+Cast((DATEDIFF(DAY,tblbookin.bookindt,tblrelease.releaseddt)) * 62.46 as varchar(20))
when (tblbookin.bookindt between '2014-10-01 00:00:00.000' AND '2015-09-30 23:59:59.999')
then '$'+Cast((DATEDIFF(DAY,tblbookin.bookindt,tblrelease.releaseddt)) * 63.11 as varchar(20))
end as [Cost]


No comments:

Post a Comment