I'd have to see the reason for the Union All statements (evident from the query, most likely) to be more specific, but if it's all coming from one table or the same tables, then it's probably just someone trying to avoid OR statements in a Where clause. That's the most usual reason I see for that. It was a very valid performance-tuning technique in older versions of SQL Server, but not so valid since SQL 2005.
It can often be avoided and simplified by using a parameterized dynamic query. That's usually faster, too, as well as easier to maintain.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon