Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / April 2006

Tip: Looking for answers? Try searching our database.

Help with query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Subs - 20 Apr 2006 20:31 GMT
I have a query

Data in column A    Data in column B

John                        xcd
Fred                        bys
Jim                          bys
Jim                          bys

When I do a group by I get

John                        xcd
Fred                        bys
Jim                          bys

If i want to filter on Jim and count the number in Column B
How do I get a query to give me one line that gives me

Jim                   2

Thanks for any help

Subs
Duncan Bachen - 20 Apr 2006 21:41 GMT
> I have a query
>
[quoted text clipped - 19 lines]
>
> Subs

Turn your select query into a totals query, With Jim as the criteria,
and a count on column B

SELECT ColumnA, Count(ColumnB) AS CountOfColumnB
FROM tblYourTable
GROUP BY ColumnA
HAVING (ColumnA="Jim");

Signature

-D
Duncan Bachen
Director of I.T., Ole Hansen and Sons, Inc.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.