what about this:
select id, a.PartId
from #cars
cross apply (VALUES (1*[part1]), (2*[part2]), (3*[part3])) a(PartId)
where a.PartId > 0
_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
(So many miracle inventions provided by MS to us...)
How to post your question to get the best and quick help[/url]