4 Replies Latest reply on Mar 1, 2017 6:22 AM by Marco Ardito

    Integer division result

    Marco Ardito Master

      What is the expected output of SELECT <integer>/<integer> ?

       

      Like SELECT 1/2

       

      In Squirrel I try that, and I get 0, while I would like to get 0.5

      Tried parsing, casting, but nothing seems to work, how should I do?

       

      in the same way, SELECT 23/2 gives 11, not 11.5

      while SELECT 22/2 gives 11

       

      (Teiid 9.0.2.)

       

      Thanks