Created
February 7, 2013 06:14
-
-
Save maartenl/4728923 to your computer and use it in GitHub Desktop.
Examples of DECODE to CASE.
This file contains 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
-- provides percentage taxation | |
DECODE (tax.taxtype, 'VAT', tax.vat, tax.general) TAX, | |
-- changed to | |
CASE tax.taxtype | |
WHEN 'VAT' THEN tax.vat | |
ELSE tax.general | |
END TAX, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment