Skip to content

SQL list comma option

Tako Lee edited this page Feb 26, 2014 · 11 revisions

Comma option is used to set style of comma in list items, so it's valid only when used with list option.

Type definition
  • Type name: TFmtCommaOption
  • Available values:
    • 0: after_item
    • 1: after_item_with_1_space
    • 2: before_item_inside_list
    • 3: before_item_outside_list
    • 4: before_item_outside_list_with_n_space
Sampels
  • After item

    SELECT Name,ProductNumber,ListPrice AS Price
    FROM Production.Product 
    ORDER BY Name ASC;
    SELECT Name, 
           ProductNumber, 
           ListPrice AS Price
    FROM Production.Product
  • After item and followed by a space

    SELECT Name, ProductNumber, ListPrice AS Price
    FROM Production.Product 
    ORDER BY Name ASC;
  • Before item and inside list

    SELECT Name
           ,ProductNumber
           ,ListPrice AS Price
    FROM Production.Product
  • Before item and outside list

    SELECT Name
          ,ProductNumber
          ,ListPrice AS Price
    FROM Production.Product
  • Before item and outside list and preceded by 1 or n space(s)

    SELECT Name
         , ProductNumber
         , ListPrice AS Price
    FROM Production.Product
Clone this wiki locally