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 |
|
tocroi72
Yak Posting Veteran
89 Posts |
Posted - 2006-03-08 : 13:46:37
|
| I have a table like thisCompanyNam, Product, TotalQTYAAA TTT 3AAA HHH 2BBB TTT 5BBB LLL 9I need it look like below in the reportCompanyName [Count of total] TTT HHH LLLAAA 5 3 2 BBB 14 5 9Below is the table scriptcreate table #tmp(company varchar(10), product varchar(10),total smallint)insert into #tmp select 'AAA','TTT',3insert into #tmp select 'AAA','HHH',2insert into #tmp select 'BBB','TTT',5insert into #tmp select 'BBB','LLL',9Thank you very much any help. |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
|
|
tocroi72
Yak Posting Veteran
89 Posts |
Posted - 2006-03-08 : 14:38:25
|
| Thank you, got it. |
 |
|
|
|
|
|