Skip to content
Tako Lee edited this page Mar 25, 2014 · 16 revisions
  • Subquery

    Option: fmt033_subquery_start_parenthesis_in_newline = true, type: TFmtBoolean.

    Option: fmt034_subquery_start_parenthesis_indent = n, type: TFmtBoolean.

    Option: fmt037_subquery_select_keyword_in_newline = true, type: TFmtBoolean.

    Option: fmt038_subquery_select_keyword_indent = n, type: TFmtBoolean. If start parenthesis is start from new line, then this value is offset to the column position of start parenthesis, otherwise, it's offset to the first column of previous line.

    Option: fmt035_subquery_end_parenthesis_in_newline = true, type: TFmtBoolean. If end parenthesis is at new line, it must be at the same column with start parenthesis.

    SELECT SUM (Sales) FROM Store_Information
    WHERE Store_Name IN 
           (
             SELECT Store_Name FROM Geography
             WHERE Region_Name = 'West'
           );
  • Put comparison operator after subquery into new line

    SELECT [CategoryID] AS [CategoryId], 
    FROM   [dbo].[Categories] 
    WHERE  (SELECT Sum([LPA_L1].[UnitsInStock]) AS [LPAV_] 
                 FROM   (SELECT [CategoryID] AS [CategoryId], 
                         FROM   [dbo].[Products] 
                         WHERE  [Products].[CategoryID] 
                              = [Categories].[CategoryID] ) [LPA_L1])
           > @p2 
Clone this wiki locally