The requirements states that if chargeType is not 'ADV_SWITCH_FEE' then i must return blank, hence "else ''"
why not return it as decimal itself and do this formatting at presentation layer? it doesnt make sense to return decimal as varchar for sql especially if you want to do some further manipulations using this value like sorting etc
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/