# Decimal to store 15 decimal places

• ### Question

• Hello,

In my databases I am using decimal (28,12) which was ok so far. Problem is that now I need more decimal places. In this case 15 places. Can you please let me know what can I choose as decimal to stotre this infromation?

Thank you

PR

Wednesday, February 21, 2018 1:12 PM

• Exactly!!

Did this help you solve your issue? If so and if you'd like to, you could mark corresponding post as answer. That way, people who in this forum and have similar issue will benefit from it.

Thanks for your understanding and support.

Ousama EL HOR

[If a post helps to resolve your issue, please click the "Mark as Answer"  of that post or click "Vote as helpful"  button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

[User Page]     [MSDN Page]     [Blog]     [Linkedin]

• Edited by Wednesday, February 21, 2018 2:15 PM
• Marked as answer by Wednesday, February 21, 2018 2:35 PM
Wednesday, February 21, 2018 2:14 PM

### All replies

• Hi,

You have to use decimal(31,15),

31 is the number of decimal digits that will be stored, both to the left and to the right of the decimal point.

15 is the number of decimal digits that will be stored to the right of the decimal point.

Ousama EL HOR

[If a post helps to resolve your issue, please click the "Mark as Answer"  of that post or click "Vote as helpful"  button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

[User Page]     [MSDN Page]     [Blog]     [Linkedin]

Wednesday, February 21, 2018 1:28 PM
• you can use  Decimal(35,15) to store 15 decimal places. It will be capable of handling upto 20 digits in the integer part (i.e before decimals)

Visakh
----------------------------
My Wiki User Page
My MSDN Page
My Personal Blog

Wednesday, February 21, 2018 1:29 PM

I will use the (31,15).

But you say that 31 is the total number of number that I will be able to store. So if I put 20 on the left side, then I can only use 11 as decimal places, correct?

What about if I want to store 25 in the right side? I can use only 6 on the left side, correct?

PR

Wednesday, February 21, 2018 1:32 PM
• If you use 20 on the left and 15 in the right : decimal (20,15).

Then you will have 20 number as total with 15 number in the right side and 5 number in the left side.

with decimal(25,15) : 15 number in the right and 25-15=10 in the left.

Ousama EL HOR

[If a post helps to resolve your issue, please click the "Mark as Answer"  of that post or click "Vote as helpful"  button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

[User Page]     [MSDN Page]     [Blog]     [Linkedin]

Wednesday, February 21, 2018 1:42 PM
• ha, ok. So its always

(the rest , the reserved)

So, if decimal (20,15) :

then:

if I use the 15  on the right side,  only 5 available to the left side

if I use only 12 in the right side,   I will be able to put 8 in the left side.

PR

Wednesday, February 21, 2018 2:10 PM
• Exactly!!

Did this help you solve your issue? If so and if you'd like to, you could mark corresponding post as answer. That way, people who in this forum and have similar issue will benefit from it.

Thanks for your understanding and support.

Ousama EL HOR

[If a post helps to resolve your issue, please click the "Mark as Answer"  of that post or click "Vote as helpful"  button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

[User Page]     [MSDN Page]     [Blog]     [Linkedin]

• Edited by Wednesday, February 21, 2018 2:15 PM
• Marked as answer by Wednesday, February 21, 2018 2:35 PM
Wednesday, February 21, 2018 2:14 PM