In an SQL statement, I am trying to divide two integers (integer 1 is \"abc\" in my code below, integer 2 is \"xyz\" in my code), and get a result as a decimal (def in my co
Convert to decimal before the divide, not after. The convert for answer format.
SELECT CONVERT( DECIMAL(4,3) , ( CONVERT(DECIMAL(10,3), abc) / CONVERT(DECIMAL(10,3), xyz) ) ) AS def