It needs to be and not--not or
((EncounterOutcomeCATID <> 23) or
(EncounterOutcomeCATID <> 32) and
(EncounterOutcomeCATID <> 27) and
(EncounterOutcomeCATID <> 24) and
(EncounterOutcomeCATID <> 25))
-----Original Message-----
From: Julie Clegg [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 08, 2001 2:19 PM
To: CF-Talk
Subject: Access Help!!!
Hello,
I am in need of a little more access/query help! I have a table
"Appointments". I need to create a report that will give me the total
number of meeting for each month in the year 2000 that dont have a certain
outcomecategory....I put together a query that I thought would acomplish
this but it doesnt seem to work....can anyone show me what I need to change
to make it work....?
AppointmentsTable
-----------------
AppointmentID Date EncounterOutcomeID
1 01/05/00 5
My Query:
SELECT Sum(AppointmentID), DatePart("MM", Date) AS DateMonth
FROM tblAppointments
WHERE ((tblAppointments.Date) Between #1/1/2001# And #12/31/2000#)
AND ((EncounterOutcomeCATID <> 23) or
(EncounterOutcomeCATID <> 32) or
(EncounterOutcomeCATID <> 27) or
(EncounterOutcomeCATID <> 24) or
(EncounterOutcomeCATID <> 25))
GROUP BY DatePart("MM", Date);
The result I get from this is 2 columns with no data: Expr1000, DateMonth
TIA,
Julie
>From: "Norman Elton" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: RE: Simple Access Query Help
>Date: Thu, 07 Jun 2001 10:33:04 -0400
>
>How about:
>
>SELECT Avg(DateDiff("n",BegTime,EndTime)) AS AvgLength FROM Meetings WHERE
>DatePart("yyyy",BegTime) = 2000 GROUP BY Site
>
>That should return the average time in minutes.
>
>Hope this helps
>
>Norman
>
>-----Original Message-----
>From: Julie Clegg [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, June 07, 2001 10:11 AM
>To: CF-Talk
>Subject: Simple Access Query Help
>
>
>
>Hello,
>
>Can anyone help me with this simple query...? I have a "Meeting Table"
>which stores the begining time and ending time of each meeting conducted,
>per site. I need to write a query to calculate the average
>meeting time per site for the year 2000. Below is an example of my table:
>
>MeetingNumber BegTime EndTime Site
> 1 2:15am 3:00am 3
> 2 12:30pm 1:05pm 3
> 3 6:53am 12:08pm 9
>
>
>Thanks In Advance!!!!!!!!!!
>
>Julie
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists