Jeff Moden (2/5/2014)
kishorefeb28 (2/4/2014)
i found its not recommended so i have requested to handle it in the front end .You obviously didn't hear that from me. 😉 There's absolutely no reason why this can't be done in T-SQL and it's one less piece of managed code that you would have to resource, recompile, and repromote if you needed to make a change. Think of it as easy encapsulation. 😉
There's a simple reason of why would I do this on the front end. Formatting totals and subtotals is a lot simpler that way. That's, of course, depending on what the front end is.
As you say: "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." But it doesn't mean you should, what you need to do is to evaluate different options and now is time for the OP to decide.