Hello
I have a records like this:
start, end , total
830 , 1300, 5
1400, 1430, 2
that I'd like to expand to:
instance , total
830 , 5
831 , 5
832 , 5
...
1299 , 5
1300 , 5
1400 , 2
1401 , 2
...
1429 , 2
1430 , 2
How can I do this using SQL in MSSQL 2005?
EDIT: thanks everyone, great answers. Got a few to work. I just forgot to say though that the start/end was really a time stored as an int, so 0830 to 1300 should go upto 0859 then 0900. I can't expect you guys to answer that in this same question, i'll work around it. Thanks again