SQL Pretty Printer format options Reference
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

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;