In SQL Server 2000 I'm trying to create a view that will give me a range of record references for summary levels. I can build views that will give me the starting number for each range, but the ending number would be lower than the starting number for the next range and I can't figure out how to get that.
Summary Level 2 Group View:
SummaryGrp LocOrder
22XXX 19
23XXX 24
31XXX 29
Actual locations view:
Loc LocOrder
22132 20
29352 21
39485 22
23155 25
23156 26
33243 27
31443 30
31554 31
At minimum, I need each SummaryGrp to display the highest LocOrder number of the actual locations that are part of that SummaryGrp, but I can't figure any way to make a view that will figure that number, even one that would essentially show in the Summary Groups Level 2 view the number of the next record minus 1.
Any suggestions? I can't modify the table of the source data, since it's from another SQL database that is the company master reference.
Thanks,
Bob
Summary Level 2 Group View:
SummaryGrp LocOrder
22XXX 19
23XXX 24
31XXX 29
Actual locations view:
Loc LocOrder
22132 20
29352 21
39485 22
23155 25
23156 26
33243 27
31443 30
31554 31
At minimum, I need each SummaryGrp to display the highest LocOrder number of the actual locations that are part of that SummaryGrp, but I can't figure any way to make a view that will figure that number, even one that would essentially show in the Summary Groups Level 2 view the number of the next record minus 1.
Any suggestions? I can't modify the table of the source data, since it's from another SQL database that is the company master reference.
Thanks,
Bob