# Table number format has no effect?

**URL:** <https://forum.inductiveautomation.com/t/table-number-format-has-no-effect/2670>\
**Category:** Archived Topics\
**Created:** [February 22, 2011, 6:04pm UTC](https://forum.inductiveautomation.com/t/table-number-format-has-no-effect/2670 "2011-02-22T18:04:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cezipper](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@cezipper](https://forum.inductiveautomation.com/u/cezipper)\
**Post date:** [February 22, 2011, 6:04pm UTC](https://forum.inductiveautomation.com/t/table-number-format-has-no-effect/2670/1 "2011-02-22T18:04:55Z")

</div>

I have a data column with values like 703.1667. And it shows “703.1667” no matter what format I tell it to use suach as “#,##0” or “#,##0%” What am i missing to make the data conform to the format?

I am pulling the data from a My SQL data base with the following query:

SELECT goodlbs/schHrs as lbsPerSchHour  
FROM OEE\_EFoutputByRun as lbs  
LEFT JOIN OEE\_TimeSummaryByRun AS timeSum  
ON timeSum.idMachineRuns = lbs.idMachineRuns  
WHERE schHrs \> 0

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [February 22, 2011, 6:42pm UTC](https://forum.inductiveautomation.com/t/table-number-format-has-no-effect/2670/2 "2011-02-22T18:42:06Z")

</div>

The problem is that the values are coming back as strings from MySQL and we are expecting a floating point. It has to do with MySQL returning the wrong data type when doing goodlbs/schHrs in the query. Check the dataset using the dataset viewer in the designer to make sure that this is the case (data type is wrong).

If so you can either do a number format in the query using MySQL’s format function. [http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html](http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html)

Or you can create a function in MySQL that returns the value as a double no matter what. For example:`CREATE FUNCTION `toFloat`(inParam VARCHAR(255)) RETURNS double
BEGIN
  RETURN inParam;
END`You can wrap your goodlbs/schHrs with the function toFloat(goodlbs/schHrs). Let us know what you find.
