F
fktx
I am still new to Access and queries, but I understand the basics of SQL. I
have my table set up in the following format:
StationID Date_Time LocationID
42361 20070805 2
42361 20070807 2
42361 20070808 2
42361 20070809 3
42361 20070810 3
42362 20070105 4
42362 20070106 4
What I want to do is select the starting and ending dates for each
LocationID of each StationID so that I end up with something like this.
StationID LocationID StartDate EndDate
42361 2 20070805 20070808
42361 3 20070809 20070810
42362 4 20070105 20070106
If this were normal programming I would order the dates in ascending order
for each station, and then find where the difference between sequential
LocationIDs were not equal to zero. However, I can't seem to convert that
thought process into an SQL statement. Any help would be greatly appreciated.
Thanks,
FK
have my table set up in the following format:
StationID Date_Time LocationID
42361 20070805 2
42361 20070807 2
42361 20070808 2
42361 20070809 3
42361 20070810 3
42362 20070105 4
42362 20070106 4
What I want to do is select the starting and ending dates for each
LocationID of each StationID so that I end up with something like this.
StationID LocationID StartDate EndDate
42361 2 20070805 20070808
42361 3 20070809 20070810
42362 4 20070105 20070106
If this were normal programming I would order the dates in ascending order
for each station, and then find where the difference between sequential
LocationIDs were not equal to zero. However, I can't seem to convert that
thought process into an SQL statement. Any help would be greatly appreciated.
Thanks,
FK