Sean Lange (3/20/2013)
Sure this isn't too hard using a tally table.
insert #y
select #x.DocID, t.N
from #x
join tally t on t.N <= #x.pages
select * from #y
You can read about a tally table here. http://www.sqlservercentral.com/articles/T-SQL/62867/[/url]
I'm starting to see a pattern with some of the posts. Looks like people are coming here to get their homework done. Anyone else seeing this?