gFmtOpt.CTE_NewlineBeforeAs | Type: boolean | Default: true |
Example format options:
Name | Value |
gFmtOpt.CTE_NewlineBeforeAs | true |
Formatted SQL:
WITH mycte(x)
AS (SELECT x = Convert( VARCHAR(1000), 'hello' )
UNION ALL
SELECT Convert( VARCHAR(1000), x + 'a' )
FROM mycte
WHERE Len( x ) < 10
UNION ALL
SELECT Convert( VARCHAR(1000), x + 'b' )
FROM mycte
WHERE Len( x ) < 10)
SELECT x
FROM mycte
ORDER BY Len( x ),
x;
Example format options:
Name | Value |
gFmtOpt.CTE_NewlineBeforeAs | false |
Formatted SQL:
WITH mycte(x) AS (SELECT x = Convert( VARCHAR(1000), 'hello' )
UNION ALL
SELECT Convert( VARCHAR(1000), x + 'a' )
FROM mycte
WHERE Len( x ) < 10
UNION ALL
SELECT Convert( VARCHAR(1000), x + 'b' )
FROM mycte
WHERE Len( x ) < 10)
SELECT x
FROM mycte
ORDER BY Len( x ),
x;