General SQL Parser and SQL Pretty Printer Formatter options

Index

Available format options for Select list:

gFmtOpt.Select_Columnlist_Style Type: TAlignStyle Default: asStacked
gFmtOpt.Select_Columnlist_Comma Type: TLinefeedsCommaOption Default: lfAfterComma
gFmtOpt.SelectItemInNewLine Type: boolean Default: false
gFmtOpt.AlignAliasInSelectList Type: boolean Default: true

Example format options:

NameValue
gFmtOpt.Select_Columnlist_StyleasStacked
gFmtOpt.Select_Columnlist_CommalfAfterComma
gFmtOpt.SelectItemInNewLinefalse

Formatted SQL:

SELECT p.name      AS product,
       p.listprice AS 'List Price',
       p.discount  AS 'discount' 
FROM   production.product p 
       JOIN production.productsubcategory s 
         ON p.productsubcategoryid = s.productsubcategoryid 
WHERE  s.name LIKE @product 
       AND p.listprice < @maxprice; 


Example format options:

NameValue
gFmtOpt.Select_Columnlist_StyleasStacked
gFmtOpt.Select_Columnlist_Comma

lfbeforeCommaWithSpace

gFmtOpt.SelectItemInNewLinefalse

Formatted SQL:

SELECT p.name        AS product
       , p.listprice AS 'List Price'
       , p.discount  AS 'discount' 
FROM   production.product p 
       JOIN production.productsubcategory s 
         ON p.productsubcategoryid = s.productsubcategoryid 
WHERE  s.name LIKE @product 
       AND p.listprice < @maxprice; 


Example format options:

NameValue
gFmtOpt.Select_Columnlist_StyleasStacked
gFmtOpt.Select_Columnlist_CommalfAfterComma
gFmtOpt.SelectItemInNewLine

true

Formatted SQL:

SELECT 
  p.name      AS product,
  p.listprice AS 'List Price',
  p.discount  AS 'discount' 
FROM   production.product p 
       JOIN production.productsubcategory s 
         ON p.productsubcategoryid = s.productsubcategoryid 
WHERE  s.name LIKE @product 
       AND p.listprice < @maxprice; 


Example format options:

NameValue
gFmtOpt.Select_Columnlist_Style

asWrapped

gFmtOpt.Select_Columnlist_CommalfAfterComma
gFmtOpt.SelectItemInNewLinefalse

Formatted SQL:

SELECT p.name AS product,p.listprice AS 'List Price',p.discount AS 'discount' 
FROM   production.product p 
       JOIN production.productsubcategory s 
         ON p.productsubcategoryid = s.productsubcategoryid 
WHERE  s.name LIKE @product 
       AND p.listprice < @maxprice;