I try to do a calculated column using SQL Server 2008 but get a syntax error near >:
Select
*,
AverageCost = case Quantity
when > 0 then (TotalCost / Quantity)
else null
end
from ProductTable;
Could someone with sharper eyes tell me what’s wrong?
the Quantity must be after the then