Please enable JavaScript to view this site.

ESL Documentation

Action Statement

Change the format string for a column.

change column COL_ID of TABLE_NAME format to FORMAT_STRING

COL_ID

The identifier for the column you want to change.

TABLE_NAME

The identifier for a table.

FORMAT_STRING

For numeric columns, a series of the following characters indicating how you want data to appear in the column:

Format character

Meaning

#

Digit. If no significant digit, then use no character. If used after the decimal point, then use a zero.

?

Digit. If no significant digit, then use a space. If used after the decimal point, then use a zero.

0

Digit. If no significant digit, then use a zero.

-

Negative sign (default). If a positive value, then use a space.

+

Use "-" for negative and "+" for positive values.

( ... )

Negative indicator. If a positive value, then use spaces.

*

Use the next character as a fill character, inserting as many of them as are needed to fill the cell. You can include only one fill character specification in a format string.

.

Decimal separator (see "Description").

,

Thousands separator. Specify only one; ESL places them as needed (for every three digits before the decimal point).

\

Escape; that is, do not treat the next character as a format character.

"any other"

Literal character for display. Enclose all literal characters in quotes.

Description

Use this statement to change the format string for an integer, float, or boolean column. The parent of the table may not be temporary and invisible when you issue this statement or it will be ignored. Note that the same rules apply when changing a format as when defining it initially.

The actual character displayed in a table for the decimal and/or thousands separator depends on how those values are set at the operating system level for each specific user's workstation.

For boolean columns, specify FORMAT_STRING as a value you want used for false, then a vertical bar, and then the value you want used for true; for example, "false|true" or "female|male". The default is "false|true".

You cannot use FORMAT_STRING with string columns.

Example

 

change column   6 of MyTable_TBL format                 to "($#,##0.00)"

change column Net of ResultsTable_TBL format    to "*=#,##0.00\" DM\""

See Also

table Object Definition, "Numeric and Boolean Formatting"

format of column Object Inquiry Built-in Function