A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count in Query



 
 
Thread Tools Display Modes
  #1  
Old August 24th, 2004, 08:39 PM
Kris
external usenet poster
 
Posts: n/a
Default Count in Query

How can I write a query that will count the following
three fields?

Thanks,
Kris

Field: 133
Table: 2004_April
Total: Count
Criteria: .05

Field: 134
Table: 2004_April
Total: Count
Criteria: .08

Field: 135
Table: 2004_April
Total: Count
Criteria: .05



  #2  
Old August 24th, 2004, 11:00 PM
Gerald Stanley
external usenet poster
 
Posts: n/a
Default

Try something along the lines of

SELECT SUM(IIf([133] 0.05,1,0))AS count133, SUM(IIf([134]
0.08,1,0))AS count134, SUM(IIf([135] 0.05,1,0))AS count135

FROM 2004_April

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
How can I write a query that will count the following
three fields?

Thanks,
Kris

Field: 133
Table: 2004_April
Total: Count
Criteria: .05

Field: 134
Table: 2004_April
Total: Count
Criteria: .08

Field: 135
Table: 2004_April
Total: Count
Criteria: .05



.

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stup-id question about Count query Lunga Running & Setting Up Queries 8 August 26th, 2004 04:35 PM
query wizard error Christen General Discussion 12 August 13th, 2004 08:37 PM
EXISTS reserved word in FROM clause Stephanie Doherty Running & Setting Up Queries 6 July 21st, 2004 01:15 AM
Query By Form Craig Running & Setting Up Queries 2 June 1st, 2004 01:10 AM


All times are GMT +1. The time now is 04:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.