Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
ghx-label-10
Description
A lack of support for "format modifiers" or "template patterns" while converting numeric and potentially other types to strings is a hinderance on usability.
There may not be a way to do this as part of the SQL Standard, most database have a common extension to type conversion functions such as CONVERT() CAST() or TO_CHAR() that take a "printf" style format string as an argument. Locale awareness may have to be taken into consideration.
For example Postgresql uses this syntax to add a thousand separator:
to_char(148.5, '999D999')