I have a single table varchar, int, int like this:
OS MinSP MaxSP
-- ----- -----
2000 4 4
XP 2 3
Vista 0 2
7 0 1
What I want is a query which will generate a list of values like this:
- 2000 SP4
- XP SP2
- XP SP3
- Vista
- Vista SP1
- Vista SP2
- 7
- 7 SP1
Edit
Although MinSP and MaxSP a never more than one apart in my original example, it's possible that they will both be the same or separated by more than one. I've changed the example to illustrate.