helal.mobasher 13209
SSCommitted
Points: 1526
More actions
July 26, 2013 at 5:23 pm
#280577
How do I convert this excel formula to SQL code?
=IF(T2<R2,T2*O2,MIN(T2-R2,S2-R2)*O2)
Thanks,
Helal
Erland Sommarskog
SSC-Insane
Points: 24038
July 27, 2013 at 2:06 am
#1636394
CASE WHEN T2 < R2 THEN T2
WHEN T2 < S2 THEN T2-R2
ELSE S2
END * O2
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply