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

  • From: Alex List <alex@xxxxxxxxxxxxxx>
  • To: michaeljmoore@xxxxxxxxx, Oracle I List <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 6 May 2011 15:15:53 -0300

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

Alex


On Fri, May 6, 2011 at 14:46, Michael Moore <michaeljmoore@xxxxxxxxx> 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';
>

Other related posts: