GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.voltdb.com — STR() Using VoltDBSTR()STR() — Returns the string representation of a numeric value. SynopsisSTR( numeric-value [string-length [decimal-precision]] ) DescriptionThe STR() function returns a string representation of the numeric input. The first argument can be either a FLOAT or DECIMAL value. The optional second argument specifies the maximum size of the output string and must be an integer between 0 and 38. If the maximum string length is less than the number of characters required to represent the numeric value, the resulting string is filled with asterisk (*) characters. The default length is 10 characters. The optional third argument specifies the number of decimal places included in the output, which is specified as an integer between 0 and 12. If the numeric value requires more decimal places than specified, the value is rounded using "banker's rounding". (See the description of the FORMAT_CURRENCY() function for a description of banker's rounding.) If the decimal precision is not specified, the value is rounded and only the integer portion is returned. ExampleThe following example uses STR() to return a percentage, rounded to two decimal places and including the percent sign. SELECT STR( 100.0 * c.population / total_pop ) || '%'
FROM countries AS c,
(SELECT SUM(population) AS total_pop FROM countries) as w
WHERE c.name=?; |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |