Sie müssen +
nicht verwenden in Select-Klausel. Sollte ungefähr so lauten:
SET @sql = N'SELECT *
FROM (
SELECT ivr_reason,
CONVERT(CHAR(10),tz_date_hour, 20) AS tz_date_hour,
total_usage
FROM [Genesys_var].[dbo].[app_subcf_results2]
) AS D
PIVOT(MAX(total_usage) FOR tz_date_hour IN(' + @cols + N')) AS P;';
EXEC sp_executesql @sql;
GO