Hi i want to claculate concessbed days . here i want to check if it is not or not then only i am going to calculate.
Here is my code.
UPDATE c SET @CONCESSIONBED= IF(t.OCCBEDDAYS>0, (t.OCCBEDDAYS-t.TRANSITIONBEDDAYS-t.ESSBEDDAYS)*c.CONCESSIONRATE),0 FROM dbo.tblCAL_PLAN c CROSS JOIN #TEMP_FA_2003 t WHERE C.FACILITY='FA_2003'