Skip to content

SQL list comma option

Tako Lee edited this page Mar 2, 2024 · 11 revisions

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

1. Type in Delphi

TLinefeedsCommaOption = (lfAfterComma,lfBeforeComma,lfbeforeCommaWithSpace,lfNolinebreakComma);

2. Type in Java

public enum TLinefeedsCommaOption {
	LfAfterComma, LfbeforeCommaWithSpace, LfBeforeComma;
}

3. Uniform Type definition

  • Type name: TFmtCommaOption
  • Available values:
    • value: 0, text: after_item
    • value: 1, text: after_item_with_1_space
    • value: 2, text: before_item_inside_list
    • value: 3, text: before_item_outside_list
    • value: 4, text: before_item_outside_list_with_n_space

Samples

  • 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