Which of the two statements do you find is easier to understand?

From: Michael Moore <michaeljmoore_at_gmail.com>
Date: Fri, 6 May 2011 10:46:33 -0700
Message-ID: <BANLkTinZBfs+fm6SdmLshB+9ZmQhAa6G9A_at_mail.gmail.com>



Which of the two statements do you find is easier to understand?

WHERE (txv.business_unit2tcode NOT IN (41940)

        OR (txv.business_unit2tcode IN (41940) AND txv.ext_source_key IS NULL)); *OR*

WHERE CASE           WHEN txv.business_unit2tcode = 41940

          THEN              CASE

                WHEN txv.ext_source_key IS NULL THEN 'true'

                ELSE 'false'

             END

          ELSE

             'true'

       END = 'true';

--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 06 2011 - 12:46:33 CDT

Original text of this message