frecapi (2/14/2011)
No I didn't think about that. Something like:Select ID, apn, (select permit_1 from #mytable), from #mytable union all
Select ID, apn, (select permit_2 from #mytable), from #mytable....
Yep... kind of. You need to have something in there so you don't include nulls for permits that don't exist. Then you could also have start and end dates for each permit. Every APN could have 1 to as many permits as you need without worrying about running out of columns.
--Jeff Moden
Change is inevitable... Change for the better is not.