Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9218

Re: to_decimal_ext function

$
0
0

Hi Kiwi,

 

To_decimal_ext syntax as per the reference guide as shown below.

 

to_decimal_ext(<in_str, decimal_sep, thousand_sep, precision, scale>)

 

Your input :

 

to_decimal_ext('99,567.99', '.', ',',38,3)

 

in_str= 99,567.99

decimal_sep=.

Thousand_sep=,

precision=38

Scale=3

 

Scale means , after decimal point(.) number of digits .

 

In our example we have given scale as 3 but input we have only 2 only . That's why it is converted as 990.

If it is 4 then it will convert as 9900.

 

Here we have 38 is precision means no of digits in the decimal string . It includes before decimal point(.) and after decimal point.  It is maximum count of digits in the input except decimal point. As per input we can have 38 digits in the decimal string except decimal value.

 

I hope you understand .

 

 

Thanks & Regards,

Ramana.


Viewing all articles
Browse latest Browse all 9218

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>