Ok thanks, I have successfully made it as UDF from Java class. Anyway why is this not added as function in H2? Like FORMATDATETIME? We could have FORMATNUMBER(number, pattern)
Thx. On Mar 13, 2:18 am, Thomas Mueller <[email protected]> wrote: > Hi, > > As an example, you could use: > > -- TO_CHAR > drop alias if exists TO_CHAR; > create alias TO_CHAR as $$ > String toChar(BigDecimal x, String pattern) throws Exception { > return new java.text.DecimalFormat(pattern).format(x);} > > $$; > call TO_CHAR(123456789.12, '###,###,###,###.##'); > > Regards, > Thomas -- 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.
