You could write your own "formatnumber" function (assuming it was a feature
in H2 1.0)

http://www.h2database.com/html/features.html#user_defined_functions

... or you could do it in your client application.

On Wed, Mar 10, 2010 at 7:54 PM, satio <[email protected]> wrote:

> Hi, i wanna ask how to format a number into varchar.
> E.g:
> The query:
> SELECT CONCAT(sale_curr, ' ', sale_total) FROM Sales
> The result:
> USD 400.00
> USD 5000.00
> USD 10000.25
> I want to make the result like this:
> USD 400
> USD 5,000
> USD 10,000.25
>
> What function should I use to format the number into formatted text?
> (like formatting date to text using FORMATDATETIME, but I can't find
> function FORMATNUMBER).
> I'm using the old version of H2 (1.0)
>
> Thx.
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<h2-database%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to