update PD set quantity =
  (
    case
      when ((quantity - @transferqnty) <= 0) then attrited = 'true'
      else (quantity - @transeferqnty)
    end
  )
from K_RT_PurchaseDet as PD
inner join K_RT_Productdetails as PS on PD.product = PS.sno 
where PS.productname = @Purchaseid
I want to update column name when quantity becomes zero I wrote like this but I am getting
"Incorrect syntax near '='."
What's wrong in this please help me....
 
     
     
    