Jeff's SQL Server Blog

Random Thoughts & Cartesian Products with Microsoft SQL Server
posts - 157, comments - 2686, trackbacks - 64

My Links

Advertisement

News

Welcome to my weblog. My name is Jeff Smith, I am software developer in Boston, MA and I was recently named a 2009 SQL Server MVP. Check in frequently for tips, tricks, commentary and ideas on SQL Server and .NET programming.


Subscribe





Archives

Post Categories

Programming

Sports

SQL

Northwind sample view

create view PivotTest
as
select
  o.customerID, c.CompanyName, p.productName, sum(od.quantity) as Qty 
from
  orders o 
inner join
  [order details] od on o.orderID = od.orderID 
inner join
 
Products p on od.ProductID = p.ProductID 
inner join
 
Customers c  on o.CustomerID = c.CustomerID 
group by
  o.customerID, c.CompanyName, p.ProductName

Print | posted on Thursday, May 12, 2005 9:44 AM |

Feedback

Gravatar

# .NET CrossTabs versus SQL Server CrossTabs

5/12/2005 3:27 PM | Welcome to Jeff's Blog
Gravatar

# ASP and ADO Pivots -- Old School Cross Tabs

5/15/2005 9:26 PM | Welcome to Jeff's Blog
Gravatar

# ASP and ADO Pivots -- Old School Cross Tabs

5/15/2005 9:33 PM | Welcome to Jeff's Blog
Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET