MCTampa
Board Regular
- Joined
- Apr 14, 2016
- Messages
- 97
I have the following table for which I would like to create groups of consecutive weeks by min and max values.
<caption> Automatics </caption><thead>
[TH="bgcolor: #c0c0c0"] AREA Code [/TH]
[TH="bgcolor: #c0c0c0"] Week [/TH]
</thead><tbody>
</tbody><tfoot></tfoot>
The end result I would like is:
[TABLE="width: 215"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Area Code[/TD]
[TD]Week Start[/TD]
[TD]Week End[/TD]
[/TR]
[TR]
[TD="align: right"]330[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]330[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="align: right"]330[/TD]
[TD="align: right"]47[/TD]
[TD="align: right"]50[/TD]
[/TR]
</tbody>[/TABLE]
I'm trying to write this in SQL but many of the solutions I've found online reference using the ROW_NUMBER() function which Access does not recognize.
Can someone please help me out?
Thanks
330 | 1 |
330 | 2 |
330 | 3 |
330 | 4 |
330 | 33 |
330 | 34 |
330 | 35 |
330 | 36 |
330 | 37 |
330 | 38 |
330 | 39 |
330 | 40 |
330 | 41 |
330 | 42 |
330 | 43 |
330 | 44 |
330 | 45 |
330 | 47 |
330 | 48 |
330 | 49 |
330 | 50 |
<caption> Automatics </caption><thead>
[TH="bgcolor: #c0c0c0"] AREA Code [/TH]
[TH="bgcolor: #c0c0c0"] Week [/TH]
</thead><tbody>
</tbody><tfoot></tfoot>
The end result I would like is:
[TABLE="width: 215"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Area Code[/TD]
[TD]Week Start[/TD]
[TD]Week End[/TD]
[/TR]
[TR]
[TD="align: right"]330[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]330[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="align: right"]330[/TD]
[TD="align: right"]47[/TD]
[TD="align: right"]50[/TD]
[/TR]
</tbody>[/TABLE]
I'm trying to write this in SQL but many of the solutions I've found online reference using the ROW_NUMBER() function which Access does not recognize.
Can someone please help me out?
Thanks