You can translate the question and the replies:

Number formatting - equivalent to to_char?

I need to format a number as 9,999.00 (ex: 2,324.22). In Oracle I would use the to_char function. Do you have any built-in functions that would do anything similar?
16-09-2015 12:04:50 -0400

2 Answers

Hello, You can format values using a regex function in VDP. For example, to format the value you mentioned you might use something similar to the following: regexp(view_name.field1, '(\\d*)(\\d{3})\\.(\\d*)', '$1,$2.$3') You can also consult the document in the Knowledge Base titled "Number of decimal places" to use the i18n map to format your numbers. If the value represents a currency you can use the CAST function to cast it as a money type which, depending on your internationalization configuration, will use the format ###,###,###.## Hope this helps!
Denodo Team
17-09-2015 08:01:13 -0400
Let me give that a shot today and see what happens! Regex always eludes me so I never think of it. Thanks!
18-09-2015 08:31:49 -0400
You must sign in to add an answer. If you do not have an account, you can register here