How to format scientific notation

Hi guys. I’m trying to convert numbers to scientific notation in Dremio.
If you see the above screenshot, to_char works differently in Dremio for scientific notation.
Could you help me to figure this out?

We don’t have to use to_char. As long as I can convert numbers to scientific notation, any approach will be welcome.

Thanks In advance.

@smjung081 Let me check on this and get back to you

@smjung081 Dremio uses the the java decimal format (DecimalFormat (Java Platform SE 7 )) for the pattern.
So in your case to_char(1123.23, '0.##E0') would work.

1 Like

Thank you @balaji.ramaswamy and @Projjal_Chanda. Java decimal format works!