Hi Kevin
>Hi, if you're using SQL 2005 as your database
No
>(you mentioned T-SQL, but you've specified Firebird as your database???),
Correct, I just didn't want VFP SQL code
>you can use the PIVOT statement to convert rows of data into columns.
I guess FireBird does not have it. How would you have written this without a PIVOT command, lots of CASE WHENs?
Thanks for your response.