M
miyomo
Hi!
I Have a table like this
DateActivity Activity
01/01/2000 OFFDUTY
I would like to have a query to return
1) SundayOnDuty(Activitiy<>'OFFDUTY')
2) SundayOffDuty(Activitiy='OFFDUTY')
3) Total Sunday
between 2 date.
Is it possible to do it in a query or I have to run the
query 3 times? (Flights.Activity Like 'OFF*') / (Flights.Activity NOT LIKE
'OFF*') / (WEEKDAY(Flights.ActivityDate )=1);
SELECT COUNT(*) AS SundayOnDuty
FROM Flights
WHERE (Flights.Activity Like 'OFF*') And (WEEKDAY(Flights.ActivityDate )=1)
And (Flights.ActivityDate BETWEEN #Date1#,#Date2#);
Thanks
Miyomo
I Have a table like this
DateActivity Activity
01/01/2000 OFFDUTY
I would like to have a query to return
1) SundayOnDuty(Activitiy<>'OFFDUTY')
2) SundayOffDuty(Activitiy='OFFDUTY')
3) Total Sunday
between 2 date.
Is it possible to do it in a query or I have to run the
query 3 times? (Flights.Activity Like 'OFF*') / (Flights.Activity NOT LIKE
'OFF*') / (WEEKDAY(Flights.ActivityDate )=1);
SELECT COUNT(*) AS SundayOnDuty
FROM Flights
WHERE (Flights.Activity Like 'OFF*') And (WEEKDAY(Flights.ActivityDate )=1)
And (Flights.ActivityDate BETWEEN #Date1#,#Date2#);
Thanks
Miyomo