Discussion on:
View:
Show:
Do these tips help clarify some of your options when it comes to arranging SQL data? What other suggestions or techniques would you add to the list?
I work with sql on a daily basis. but, a lot of it is overly simplified. This will be a good bookmark for future case's. Also, I am trying to lead myself into doing stored procedures for some future development at work. They either do sql or other applications doing the sql within themselves. If I can talk them into utilizing stored procedures so that different developers can assist various parts of a project. I could get some more intresting work. This will help.
thanks,
Dan
thanks,
Dan
This is a nice little summary of summarizing, but your final example should read as below, else you lose your customer.
SELECT GROUPING(Customer), Customer, OrderNumber, Sum(Cost * Quantity) AS OrderTotal
FROM Orders
GROUP BY Customer, OrderNumber
WITH CUBE
SELECT GROUPING(Customer), Customer, OrderNumber, Sum(Cost * Quantity) AS OrderTotal
FROM Orders
GROUP BY Customer, OrderNumber
WITH CUBE
These are useful options which are unknown to me. very useful for reporting purpose.
Thanks.
Thanks.
- Keyboard Shortcuts:
- Prev
- Next
- Toggle









































