CREATE OR ALTER     VIEW [dbo].[VWCUST_REPORT_VIEWER]
AS
SELECT c010, c012, c013, c014, c017, c029, c044, c089, c154, STRING_AGG(c045, ', ') AS c045, STRING_AGG(u047, CHAR(10)) AS u047 FROM t025 WHERE c044 IS NOT NULL AND c045 IS NOT NULL AND U047 IS NOT NULL AND NOT (c023 = 'L' AND c024 = 'L' AND c025 = 'L' AND c026 = 'L') GROUP BY c010, c012, c013, c014, c017, c029, c044, c089, c154
GO