Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
JohnGault777
Starting Member
31 Posts |
Posted - 2011-02-21 : 12:11:58
|
| I am new to SQL but I need to develop a fairly complex report out of our system. I'm looking to see the Sale and Quote counts by County for each of the eligible divisions receiving the quote for each week. Here's the output I'm looking for: Report for a single week for each Product (3 products): for example: Feb. 19, 2011 – Feb. 25, 2011County SaleCount QuoteCount SaleCount QuoteCount (DivisionA) (DivisionA) (DivisionB) (DivisionB) ________________________________________________________A B C D E ….etc. If I could see all three products on the same report that would be awesome. So that would be 12 total columns. Each group of 4 columns would be a new product. In addition, I would like to see all available Counties, even if they didn't receive a quote or sale.Here are the tables and columns I'm working with. dbo.Customer ------------------CustomerIDCountyQuoteDateSaleDateProductIDDbo.Product ------------------ProductIDProductType (only 3 products)dbo.Eligibility------------------EligibilityIDCustomerID OrganizationIDdbo.Organization------------------OrganizationIDDivision (2 divisions: A and B)I can pull the information individually, pull it out of SQL and reorganize it to look like the desired output in Excel, but that is way too time consuming. Can someone help me leap frog my current skill level to develop this type of output? I just simply do not understand how you generate columns of information based on separate evaluation criteria and display it next to each other. JG777 |
|
|
JohnGault777
Starting Member
31 Posts |
Posted - 2011-02-21 : 12:12:43
|
| Oh, sorry, I'm working in SQL Server 2005.JG777 |
 |
|
|
|
|
|