Tell me more ×  I have 3 tables. Person, Group and PersonGroup.
Each Person can be in multiple Groups. In the PersonGroup table
there's a field called ShowCount, which says how many times a
Person should be shown.  Example: Person Bill is in group
StackOverflow and should be displayed 3 times so the output
should be like this   is there a way to do this with SQL?
share|improve this question Yes, it's possible. Two ideas: 1)
join with a "numbers" table 2) recursive CTE. –  Mark Byers Oct
13 '11 at 11:01 Your data model sounds a little odd - why is
bill in the same group three times? –  Paddy Oct 13 '11 at 11:06
He's not. if he was there would be three entries. The ShowCount
says how many times his address should be printed out (or be on
the report). –  domueni Oct 13 '11 at 11:08 See this similar
question:… (the answer by @van) –  ypercube Oct 13 '11 at 11:21
Or this answer by @Evan:… –  ypercube Oct 13 '11 at 11:23 show 1
more comment  3 Answers  up vote 1 down vote accepted  Hello a
numbers table can help y