PC Review


Reply
Thread Tools Rate Thread

Help with query

 
 
Subs
Guest
Posts: n/a
 
      20th Apr 2006
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










 
Reply With Quote
 
 
 
 
Duncan Bachen
Guest
Posts: n/a
 
      20th Apr 2006
Subs wrote:
> 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


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");


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

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help help help help help help win98 to xp professional =?Utf-8?B?JiZMRUUmJg==?= Windows XP Help 2 23rd Oct 2005 04:00 PM
HELP NEEDED FAST!!! HELP HELP HELP HELP HELP HELP FAST HELP NEEDED Jonathan Windows XP General 10 13th Jan 2005 03:22 AM
HELP HELP HELP HELP HELP HELP =?Utf-8?B?U2FuYXRhcml1bV83?= Windows XP General 2 25th Sep 2004 04:00 PM
HELP HELP HELP HELP HELP HELP =?Utf-8?B?U2FuYXRhcml1bV83?= Windows XP General 1 25th Sep 2004 07:54 AM
Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! -$- Windows XP Internet Explorer 2 21st Dec 2003 11:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:18 PM.