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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-08-28 : 11:25:36
|
| Baba-SQL writes "Hi Guru !i have this table called List with the column called Name. Before i know that in the list i will have only 3 names that are "jonny , alex , alan" and not more:Name-----jonnyalexalexjonnyalanalexjonnySo i want create an array for each result of recordcount for each name. Mybe i can use a multiple select count subrutine extracting the result for each name....the result will be :array1= 3 '(total count of jonny in the Name column)array2= 3 '(total count of alex in the Name column)array3= 1 '(total count of alex in the Name column)I need an array for each name because after i need to build a simple chart displaing the result using a simple chart bar for each name.tnx in advance for any help !Baba-SQL" |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-08-28 : 11:38:41
|
select [name], count(*) as [count]from listgroup by [name] Jay White{0} |
 |
|
|
samrat
Yak Posting Veteran
94 Posts |
Posted - 2002-08-28 : 11:44:37
|
| ..and if u wanna use the result from the query for some processing use the temporary table to store the result set.Cheers,Samrat |
 |
|
|
|
|
|