Created
November 30, 2016 19:14
-
-
Save chadsten/3d55002a381a26247398a91ea94c0edd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CASE | |
WHEN (PartPlant.LeadTime <= '7') | |
THEN CONVERT(DECIMAL(16, 4), CEILING((MonthAvg * 1) * 1.1)) | |
WHEN (PartPlant.LeadTime > '7' AND PartPlant.LeadTime <= '14') | |
THEN CONVERT(DECIMAL(16, 4), CEILING((MonthAvg * 1.2) * 1.1)) | |
WHEN (PartPlant.LeadTime > '14' AND PartPlant.LeadTime <= '30') | |
THEN CONVERT(DECIMAL(16, 4), CEILING((MonthAvg * 1.5)) * 1.1) | |
WHEN (PartPlant.LeadTime > '30') | |
THEN CONVERT(DECIMAL(16, 4),CEILING((MonthAvg * 2) * 1.1)) | |
END AS SugMax |
EG:
CONVERT(DECIMAL(16, 4),CEILING((1.75 * 2) * 1.1))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is returning X.X0 instead of X.00