Returns a value using a specified format.
Category: | Special |
Returned data type: | NVARCHAR VARBINARY BINARY |
identifies the variable or constant whose value you want to reformat.
Data type | A data type that is supported by the format argument |
contains the SAS or FedSQL format that you want applied to the variable or constant that is specified in the source.
left aligns the value
centers the value
right aligns the value
Restriction | The format must be the same type as the value of source |
Statement
|
Result
|
---|---|
select put(0.6666666667, fract8.); |
2/3 |
select put(date(), date.); |
19SEP13 |
select put(AvgLow, 4.1) from worldtemps; |
45.0 33.0 17.0 68.0 56.0 57.0 28.0 51.0 75.0 36.0 33.0 25.0 |