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

From: Alex List <alex_at_octanti.com.br>
Date: Fri, 6 May 2011 15:15:53 -0300
Message-ID: <BANLkTikXCOjFQX5oEo6Rt8X6uZadypbVfQ_at_mail.gmail.com>



for me, I think the first much easier and clear.

Alex

On Fri, May 6, 2011 at 14:46, Michael Moore <michaeljmoore_at_gmail.com> wrote:

> 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 - 13:15:53 CDT

Original text of this message