• + 0 comments

    I came up with nearly the same exact code. However I am receiving errors. I am getting "isoceles" returned instead of "Not a triangle" for one of the test cases.

    SELECT CASE WHEN A = B AND B = C THEN 'Equilateral' WHEN A = B OR A = C OR B = C THEN 'Isosceles' WHEN A + B <= C OR A + C <= B OR B + C <= A THEN 'Not A Triangle' ELSE 'Scalene' END FROM TRIANGLES;

    HELP??