P
Peter Carlson
I need to do count(Actions2="34")...is this possible? Here is the query:
SELECT last, first, middle, count(IP.Actions1) AS total,
count(IP.Actions2)+total as Runs
FROM ((People AS P LEFT JOIN Incidents_Personnel AS IP ON
IP.Person=P.id ) LEFT JOIN xPersonnel_Status AS S ON P.status=S.id)
LEFT JOIN Incidents as I on I.id=IP.IncidentNumber
WHERE P.member=1 and S.active=1 and I.AlarmDate Between #1/1/2006# And
#12/31/2006#
GROUP BY last, first, middle
ORDER BY last, first, middle
I can't simply do it in the where clause, becuase I can't restrict the
collection of Actions1
Peter
SELECT last, first, middle, count(IP.Actions1) AS total,
count(IP.Actions2)+total as Runs
FROM ((People AS P LEFT JOIN Incidents_Personnel AS IP ON
IP.Person=P.id ) LEFT JOIN xPersonnel_Status AS S ON P.status=S.id)
LEFT JOIN Incidents as I on I.id=IP.IncidentNumber
WHERE P.member=1 and S.active=1 and I.AlarmDate Between #1/1/2006# And
#12/31/2006#
GROUP BY last, first, middle
ORDER BY last, first, middle
I can't simply do it in the where clause, becuase I can't restrict the
collection of Actions1
Peter