2 Replies Latest reply on Sep 1, 2011 4:55 AM by Rakesh Balguri

    Average always returns real value instead of integer

    Rakesh Balguri Expert

      Hi all,

       

      I had added the average support in my translator. When I execute the following SQL against teiid using the database explorer eclipse plugin I always get a real number instead of an integer.

       

      SELECT AVG(DISTINCT SPACE) FROM DBMzDB2c.CAT_SYSTABLESPACE_Rbase_Vbase

       

      I always get the result as 1234.0 instead of 1234.

      The translator always returns the value as 1234 in the result set.

       

      Please let me know if I am doing anything wrong.

       

      Thanks

      Rakesh