Query with addresses

Silverad0

New member
Local time
Today, 16:27
Joined
Feb 6, 2008
Messages
3
Hello all I am using MS access for a little personal project and I have house number and streets along with a day they are serviced.
example:

unit road type day
1 main st friday
2 main st friday
3 main st friday
4 main st friday
5 main st friday
6 main st friday
7 main st friday
13 turtle st monday
15 turtle st monday
16 turtle st monday

I want to make a report of this data to look like this

unit road type day

1-7 main st friday
13-16 tutle st monday


I figure I have to do some sort of query before I can make the report im jsut not sure how to seperate it or what symbols to use. I know this is faily simple I just can not get the computer to give me what I want....


ok I think i figured it out what I did was take unit and I put it in 2 times one fo min and one for max and then I grouped the road by ascending and it worked out
 
Last edited:
Try the following SQL (substitute the highlighted text with the actual names):
Code:
SELECT Min(T1.[b][i]unit[/i][/b]) & ' - ' & Max(T1.[b][i]unit[/i][/b]) AS [b][i]unit[/i][/b], T1.[b][i]road[/i][/b], T1.[b][i]type[/i][/b], T1.[b][i]day[/i][/b]
FROM [b][i]MyTable[/i][/b] AS T1
GROUP BY T1.[b][i]road[/i][/b], T1.[b][i]type[/i][/b], T1.[b][i]day[/i][/b];
 

Users who are viewing this thread

Back
Top Bottom