Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Subtotal when vendorcode changed. Expand / Collapse
Author
Message
Posted Thursday, February 13, 2014 7:04 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 12:00 AM
Points: 35,547, Visits: 32,137
Luis Cazares (2/6/2014)
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.


If the front-end code has capabilities similar to the Matrix capabilites of SSRS, I'd agree. But even then, it's good to know how to do these types of things in T-SQL because a front end doesn't always have the capability to do it easily and, sometimes, there is no front end to be had.

It's also a heck of a lot easier to deploy and maintain than managed code.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1541172
Posted Thursday, February 13, 2014 8:31 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 4:57 PM
Points: 3,908, Visits: 8,860
Jeff Moden (2/13/2014)
Luis Cazares (2/6/2014)
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.


If the front-end code has capabilities similar to the Matrix capabilites of SSRS, I'd agree. But even then, it's good to know how to do these types of things in T-SQL because a front end doesn't always have the capability to do it easily and, sometimes, there is no front end to be had.

It's also a heck of a lot easier to deploy and maintain than managed code.


Totally agree. The best tool to do something is defined by the situation and it's good to know all the alternatives.



Luis C.
Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1541242
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse