Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Is it possible i want to add a case when on top to check if sysdate() month > 2 then go thru below calculation else put value 0.
SUM(LPAD (TO_CHAR (( (CR_Units_01 + DB_Units_01 + CR_Units_02 + DB_Units_02)/ ( CASE MOD('2013', 4) WHEN 0 THEN (177.14 + 165.71 ) ELSE (177.14 + 160.00 ) END )), 'FM99999999990.00'), 11)) AS Month2,
Thank you very much for the helpful info.
TG
Master Smack Fu Yak Hacker
6065 Posts
Posted - 2013-02-08 : 15:53:38
do you mean this?:casewhen datepart(month, getdate()) <= 2 then 0else <your expression>endEDIT:sysdate() is oracle, right? If you need oracle help try dbforums - This forum is MS Sql Server specific.Be One with the OptimizerTG