General SQL Parser and SQL Pretty Printer Formatter options

Index

Available format options for from clause and join clause:

gFmtOpt.Select_fromclause_Style Type: TAlignStyle Default: asStacked
gFmtOpt.Select_fromclause_Comma Type: TLinefeedsCommaOption Default: lfAfterComma
gFmtOpt.FromClauseInNewLine Type: boolean Default: false
gFmtOpt.Select_FromclauseJoinOnInNewline Type: boolean Default: true
gFmtOpt.AlignJoinWithFromKeyword Type: boolean Default: false

Example format options:

NameValue
gFmtOpt.Select_fromclause_StyleasStacked
gFmtOpt.Select_fromclause_CommalfAfterComma
gFmtOpt.FromClauseInNewLinefalse

Formatted SQL:

SELECT last_name,
       department_name dept_name 
FROM   employees,
       departments; 


Example format options:

NameValue
gFmtOpt.Select_fromclause_StyleasStacked
gFmtOpt.Select_fromclause_Comma

lfbeforeCommaWithSpace

gFmtOpt.FromClauseInNewLine

true

Formatted SQL:

SELECT last_name,
       department_name dept_name 
FROM   
  employees
  , departments; 


Example format options:

NameValue
gFmtOpt.Select_fromclause_Style

asWrapped

gFmtOpt.Select_fromclause_CommalfbeforeCommaWithSpace
gFmtOpt.FromClauseInNewLinetrue

Formatted SQL:

SELECT last_name,
       department_name dept_name 
FROM   
  employees,departments; 


Example format options:

NameValue
gFmtOpt.Select_FromclauseJoinOnInNewline

false

gFmtOpt.FromClauseInNewLinetrue

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_FromclauseJoinOnInNewline

true

gFmtOpt.FromClauseInNewLinetrue

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_FromclauseJoinOnInNewline

false

gFmtOpt.FromClauseInNewLinefalse

gFmtOpt.AlignJoinWithFromKeywordtrue

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;