K
Keith
not have the data "non-rev" in in the field.
Two table DB it counts and tracks TRAINS.
first table has.... Date / Train Line i.e. (Noth south east west) /
Station i.e. N-1 through N-12 (north station #1 through 12 east 1-6 west
etc...) and also a "NON_REV" designation. / auto record #
2nd table has VEH#/ Route#/ Var/ BL#/ Destination / # of passengers / Time
/record #
I need to COUNT the total # of stations that DO NOT have "non-rev" as the
data. Those are non rev trains and do not count as a trip.
What I am after is
1. total passengers (i did this "desidn view" (SUM) this works fine)
2 total "trips" this comes from "(count) of records this also works fine
3 This is what I can NOT do ...Count all STATIONS with any data "BUT" the
"NON-REV" entry.
example: Stations
N-1
W-5
N-12
E-2
NON-REV
s-4
the above should count up as 5 paid trips.
The sql created in design view for my two working sum and count is here.
SELECT Sum(PassSub.Pass) AS TOTALPASS, Count(PassSub.[Record #]) AS TRIPS
FROM [Passenger Check Inbound] INNER JOIN PassSub ON [Passenger Check
Inbound].[Record #] = PassSub.[Record #];
I have been offered code but this query already has SQL written for two
other simple total counts shown above. I do not know how to splice the
offered code into the existing SQL code above created by the design view.
people are offering is two options for code I can get neither to work even if
I start a fresh blank new query!!!
Please help I have been on this one thing all day with ZERO progerss....
Keith
Two table DB it counts and tracks TRAINS.
first table has.... Date / Train Line i.e. (Noth south east west) /
Station i.e. N-1 through N-12 (north station #1 through 12 east 1-6 west
etc...) and also a "NON_REV" designation. / auto record #
2nd table has VEH#/ Route#/ Var/ BL#/ Destination / # of passengers / Time
/record #
I need to COUNT the total # of stations that DO NOT have "non-rev" as the
data. Those are non rev trains and do not count as a trip.
What I am after is
1. total passengers (i did this "desidn view" (SUM) this works fine)
2 total "trips" this comes from "(count) of records this also works fine
3 This is what I can NOT do ...Count all STATIONS with any data "BUT" the
"NON-REV" entry.
example: Stations
N-1
W-5
N-12
E-2
NON-REV
s-4
the above should count up as 5 paid trips.
The sql created in design view for my two working sum and count is here.
SELECT Sum(PassSub.Pass) AS TOTALPASS, Count(PassSub.[Record #]) AS TRIPS
FROM [Passenger Check Inbound] INNER JOIN PassSub ON [Passenger Check
Inbound].[Record #] = PassSub.[Record #];
I have been offered code but this query already has SQL written for two
other simple total counts shown above. I do not know how to splice the
offered code into the existing SQL code above created by the design view.
people are offering is two options for code I can get neither to work even if
I start a fresh blank new query!!!
Please help I have been on this one thing all day with ZERO progerss....
Keith