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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Query Matrix???

Author  Topic 

mutlyp
Starting Member

20 Posts

Posted - 2005-09-06 : 22:37:49
I have a table that records all transactions including the name of the customer, the amount that customer spent for a week, and the Friday date when the customers totals for the week were added up.
I would like to put this information in a datagrid with rows that have the name of the customers in the first column the second column of the grid holds the total amount spent for the first week, the next column would show the amount the customer spent the second week and so on.
Example:
Table is
Customer amountspent FridayDate
Joe Blow $3.00 1/1/2005
Jane Doe $4.00 1/1/2005
Joe Blow $3.00 1/7/2005
Jane Doe $5.00 1/7/2005

Would like the datagrid to have this data:
Customer 1/1/2005 1/7/2005
Joe Blow $3.00 $3.00
Jane Doe $4.00 $5.00

Is there a query statemant that will make this happen or any other way I can do this.
Thanks
Matt

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-09-07 : 00:20:21
http://www.windowsitpro.com/SQLServer/Article/ArticleID/15608/15608.html

http://www.sqlteam.com/item.asp?ItemID=2955



MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -