473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Counting names by first letter of alphabet

How do I create a report that will give me a total by the first letter of lastname. Thank you.
Oct 22 '11 #1
3 2073
Stewart Ross
2,545 Expert Mod 2GB
You have not provided anywhere near enough information to give a firm answer to your question. I'd suggest that you investigate the use of the Left function by including within the query feeding your report the following calculated field:

Expand|Select|Wrap|Line Numbers
  1. Left([lastname], 1) as Initial
You can then group on the initial concerned, include counts and so on.

I cannot guide you further than this at present.

-Stewart
Oct 22 '11 #2
I apologize, is my first time in these type of blogs.

Here is my situation. I need to prepare a report for a school district and I need to count the students by the first letter of their last name:
A: 34
B:31
C:20
...
and present the totals
the only way I can do it is by preparing a query by each letter.

Thank you for your help.
Oct 24 '11 #3
NeoPa
32,556 Expert Mod 16PB
Grouping and aggregation will help with that.

Expand|Select|Wrap|Line Numbers
  1. SELECT   Left([LastName], 1) AS [FirstLetter]
  2.        , Count(*) As [LetterCount]
  3. FROM     [YourTable]
  4. GROUP BY Left([LastName], 1)
  5. ORDER BY Left([LastName], 1)
Oct 24 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Alan J. Flavell | last post by:
OK, today's email brought a comment from a reader, pointing out something that I'd long since noticed myself but hadn't done anything about it. On my pages, I've got a first-letter style on...
1
by: Patrick | last post by:
I am trying to get "first-letter" to work inline withing an anchor. Actually I have not been able to get it to work within an <a> tag whether inline, linked, or embedded. Using IE6 service pack 1....
3
by: news.individual.net | last post by:
Hi! Can I capitalize the first letter of the first paragraph without using a special class for that <p> ? I tried it with this: body > p:first-child:first-letter { font-size: 270%;
6
by: Fungii | last post by:
Hello, I have a stylesheet that sets p:first-letter to a certain size and colour. I was playing around with Javascript to change paragraph stylesheets using an array like this: var paras =...
1
blyxx86
by: blyxx86 | last post by:
I have the code to capitalize an entire string when it is input, but would like to capitalize just the first letter of a box, or match the case of a drop down list.. My current code is thus: ...
5
by: kukady | last post by:
Hi everyone, Apologies in advance as I'm somewhat of a novice with Access. I use an Access project (2002 SP3) via XP and am trying to create a query which will show me a range of last names...
2
by: sehodge | last post by:
<STYLE type="text/css"> P { font-size: 10pt; color:#000;} P:first-letter { font-size: 150%; color:red; font-weight: bold; float: left } </STYLE> Later, I want the first...
2
by: backups2007 | last post by:
I have a customer information form that has a list box containing all the names of the customers. And when submitted and inserted to the database, automatically displays the information onto the list...
1
by: Germaris | last post by:
Hi there! Nowadays trend is to write everything in lowercase. Last Names, First Names, City Names, etc... Maybe the use of computers is one of the reasons to such bad typing. In a form,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.