Although late to the party, why parse the table twice?
[Code]SELECT ProductID, ProductName,
CASE @OutputType WHEN 'CSV' THEN ProductDate END AS ProductDate
FROM Product;[/code]
(Typed on phone, apologies if any code typing errors).
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk