Result of a select case expression for multiplication
Can anyone tell me how to use the result of a select case statement for multiplication?
(SELECT CASE
WHEN unit = 'Sqft' THEN squareft
WHEN unit = 'Lin.Inch' THEN value
END) AS AREA,
('AREA'* pieces) AS 'Total Area'
When I used my above query I get an error:
Error converting data type varchar to numeric.
Can anyone help?