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
 Transact-SQL (2000)
 Cross Tab Queries Summarisig the data in coulmns

Author  Topic 

Asteroid
Starting Member

13 Posts

Posted - 2005-07-01 : 09:55:38
Hi,
I am stuck up i a problem.
My Table looks like this..

ID Amount
------ -------
1------ 100
2------ 100
3------ 200
4------ 100
5------ 500
2------ 200
1------ 200
1------ 200
4------ 100
1------ 500
5------ 100
5------ 100

And I need the results like this.
The result is just like sumary of the number of different amounts
Like if the amount how many times ID 1 has used amount 100 and how many times amount 200 and so on for all the IDs.

Some thing like this....

ID Count_100 Count_200 Count_500
-- ---------- --------- ----------

1---------2-----------2------------1
2---------1-----------1------------
3---------1-----------
4---------1-----------1
5---------2-----------1

Any Solution ,, Please help

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-07-01 : 10:14:00
see if this helps you
http://www.sqlteam.com/item.asp?ItemID=2955

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -