Re: Do all the legs of an "OR" with null comparisons get executed?

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 01 Apr 2008 14:30:41 -0700
Message-ID: <1207085438.630124@bubbleator.drizzle.com>


joel garry wrote:
> On Mar 31, 1:43 pm, joel garry <joel-ga..._at_home.com> wrote:
>
> And this popped up referenced on Jonathan's blog:
> http://tkyte.blogspot.com/2006/06/varying-in-lists.html
>
> jg
> --
> @home.com is bogus.
> http://richardfoote.wordpress.com/2008/03/31/announcing-finale-the-end/

Not nearly as elegant as using CAST.

CREATE OR REPLACE TYPE InStrTab IS TABLE OF VARCHAR2(20); /

DECLARE
  i PLS_INTEGER;
  x InStrTab := InStrTab('10','30');
BEGIN
   SELECT COUNT(*)
   INTO i
   FROM emp
   WHERE deptno IN (

     SELECT column_value
     FROM TABLE(CAST(x AS InStrTab)));

   dbms_output.put_line(i);
END;
/

-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Tue Apr 01 2008 - 16:30:41 CDT

Original text of this message