# Power Table Column Data Type Value

**URL:** <https://forum.inductiveautomation.com/t/power-table-column-data-type-value/12467>\
**Category:** General Discussion\
**Created:** [December 14, 2016, 6:30pm UTC](https://forum.inductiveautomation.com/t/power-table-column-data-type-value/12467 "2016-12-14T18:30:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerry101](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jerry101](https://forum.inductiveautomation.com/u/jerry101)\
**Post date:** [December 14, 2016, 6:30pm UTC](https://forum.inductiveautomation.com/t/power-table-column-data-type-value/12467/1 "2016-12-14T18:30:28Z")

</div>

I have a power table and the data i enter into a column might be something like 11.99 but when i pass this value to sql it passes 11.989997711. I want it to save to sql as 11.99 not 11.989997711.

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [December 14, 2016, 6:46pm UTC](https://forum.inductiveautomation.com/t/power-table-column-data-type-value/12467/2 "2016-12-14T18:46:29Z")

</div>

Change the datatype in your table to DECIMAL(5,2)

---

<div class="post-metadata">

**Author:** ![jerry101](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jerry101](https://forum.inductiveautomation.com/u/jerry101)\
**Post date:** [December 14, 2016, 6:54pm UTC](https://forum.inductiveautomation.com/t/power-table-column-data-type-value/12467/3 "2016-12-14T18:54:38Z")

</div>

Where do i change the data type for that column? When i view the table from the ‘Data’ property in designer it shows that column as double. Do you mean change it in SQL database?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 14, 2016, 10:31pm UTC](https://forum.inductiveautomation.com/t/power-table-column-data-type-value/12467/4 "2016-12-14T22:31:35Z")

</div>

In case anyone else is reading, you should know that this sort of this is always a possibility when working with floating point in computers. Because 11.99 doesn’t have a terminating binary fraction. Most PLC values are 32-bit floating point, while you say your column is defined as double, which is 64-bit. 32-bit floating point routines will generally round off at 6 or 7 significant digits to maintain the illusion that the binary fraction terminates, but storing a 32-bit float in a 64-bit double tricks the 64-bit routines – they don’t round until you have 16 or 17 significant digits.  
As jpark says, use a decimal instead of a binary SQL datatype if floating point imprecision is a problem.
