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
 General SQL Server Forums
 New to SQL Server Programming
 SQL2000 report subtotals code needed :)

Author  Topic 

mike31853185
Starting Member

1 Post

Posted - 2011-11-23 : 17:03:53
Hi Folks ... Thank you for your generosity!

MS SQL2000: (vbscript inside .asp)

existing table:

a,b,c,d,e,MbrCity,MbrName
-------------------------
a,b,c,d,e,detroit,tom
a,b,c,d,e,Detroit,steve
a,b,c,d,e,detroit,larry
a,b,c,d,e,new york,sue
a,b,c,d,e,New York,betty
a,b,c,d,e,New York,jeannie
a,b,c,d,e,new York,lorraine
a,b,c,d,e,houston,sam

want:

new york 4
detroit 3
houston 1

(ordered by largest # of member cities a bonus :)

Thank you !

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2011-11-24 : 04:33:46
So, how much you willing to pay for this? If this is in SQL 2000, I guess you are getting paid for your work, so you would think you had a rudimentary knowledge of your job, if not, then you really should pay someone who does.

If you want help, why not help yourself? You can look up COUNT() and GROUP BY surely? Also you may want ORDER BY.

http://msdn.microsoft.com/en-us/library/ms130214.aspx

This is not for SQL 2000, but if you have SQL 2000 installed, then it is all in the help file.


Go to Top of Page
   

- Advertisement -