SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE VIEW data.GC_Config_Pivot AS select len_invoice_number from ( select Variable, Wert from data.GC_Config ) d pivot ( max(Wert) for Variable in (len_invoice_number) ) piv; GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO GO