STR

<< Click to Display Table of Contents >>

 

STR

Returns a String with a length indicated by the @length parameter that represents the value indicated in the @value parameter with the number of decimal places equal to the value indicated in the @decimals parameter. If the number of characters used to represent the @value parameter is less than the @length parameter, the returned String is filled with spaces to the left. If the number of characters needed to represent the @value parameter is greater than the @length parameter, the returned String is composed by a sequence of asterisk (*) characters with a length equal to the @length parameter.

 

Syntax

STR(@value[, @length[, @decimals]])

 

Parameters

@value: Value to convert to a String. This is a mandatory parameter

@length: Optional parameter that defines the length of the returned String. The default value of this parameter is 10

@decimals: Number of decimal places that must represent in the returned String. If the @length parameter is less than the number of decimal places needed to represent the @value parameter exactly, the represented value is rounded up. The default value of this parameter is 0 (zero) and the maximum value is 16. Greater values are replaced by 16

Was this page useful?