Home Forums SQL Server 2008 SQL Server 2008 - General Sum prescription amounts for an individual by given a start date and number of days supplied RE: Sum prescription amounts for an individual by given a start date and number of days supplied
ken_gardiner
SSC Veteran
Points: 225
More actions
October 3, 2013 at 3:41 am
#1655472
Works perfectly. Elegant and fast solution. The only change I made was to the condition for the CASE statement:
WHEN SumStrength < 100 THEN 0 ELSE
It wasn't filling 0s otherwise.
Thank you both.