- 3134 Views
- 2 replies
- 3 kudos
select
col as original,
col::double as val_double,
col::float as val_float,
col::decimal(10,4) as val_decimal,
to_number(col, '99999.99999') as val_tonum
from int_fx_conversion_rate;The original value of col is a string such as '1...
- 3134 Views
- 2 replies
- 3 kudos
Latest Reply
Hi @Chris Chung​ Thank you for your question! To assist you better, please take a moment to review the answer and let me know if it best fits your needs.Please help us select the best solution by clicking on "Select As Best" if it does.Your feedback ...
1 More Replies
- 2076 Views
- 3 replies
- 4 kudos
All,I have a column, RateAdj that is defined as DECIMAL(15,5) and I can see that the value is 4.00000, but when this gets inserted into my table it shows as just 4.%sql
SELECT LTRIM(RTRIM(IFNULL(FORMAT_NUMBER(RateADJ, '0.00000'), '0.00000')))This i...
- 2076 Views
- 3 replies
- 4 kudos
Latest Reply
The value goes to 10,000 values and having the things done to run a fast execution, and I am also Sociology Dissertation Help with the reduction of pages.
2 More Replies
- 2720 Views
- 1 replies
- 0 kudos
I am dealing with values ranging from 10^9 to 10^-9 , the sum of values can go up to 10^20 and need accuracy. So I wanted to use Decimal Data type [ Using SQL in Data Science & Engineering workspace]. However, I got to know the peculiar behavior of D...
- 2720 Views
- 1 replies
- 0 kudos
Latest Reply
Hello Everyone,I understand that there is no best answer for this question. So, I could only do the same thing I found when I surfed the net.The method I found works whenIf you know the range of values you deal with (not just the input data but also ...
by
_Orc
• New Contributor
- 11339 Views
- 6 replies
- 3 kudos
When i run the below query in databricks sql the Precision and scale of the decimal column is getting changed.Select typeof(COALESCE(Cast(3.45 as decimal(15,6)),0));o/p: decimal(16,6)expected o/p: decimal(15,6)Any reason why the Precision and scale i...
- 11339 Views
- 6 replies
- 3 kudos
Latest Reply
You can use typeof(COALESCE(Cast(3.45 as decimal(15,6)),0.0)); (instead of 0)
5 More Replies