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
 Other Forums
 MS Access
 Count the Records

Author  Topic 

mrkbwn
Starting Member

4 Posts

Posted - 2007-03-19 : 10:44:42
Hi,

I have a database that has a field called Language. This field contains either a 1,2,3,4 - 10. 1 = english, 2=French, 3=German, etc.

using an SQL statement how would I look at this field and count how many of each number there is and output to a text file?

thanks
mrkbwn

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-19 : 10:49:19
SELECT Language, count(*) as records
from table1
group by language


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

mrkbwn
Starting Member

4 Posts

Posted - 2007-03-19 : 10:53:39
WOW! That was fast.

Thank You.
mark
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-04-04 : 09:13:11
You need to learn SQL

http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp


Madhivanan

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

- Advertisement -