Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

If condtion in calculation part

$
0
0

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'


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>