Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: UNION operators

Re: UNION operators

From: Carel-Jan Engel <cjpengel.dbalert_at_xs4all.nl>
Date: Tue, 22 Mar 2005 10:46:41 +0100
Message-Id: <1111484798.6494.5.camel@dbalert199.dbalert.nl>


A 7000-fold UNION worked on my 9.2.0.5 database (Linux). The following ksh script (apologies Jared) will help you to find the limit:

max=1000
while :
do
  count=0
  {
    echo "select $max from dual"
    while [ $count -lt $max ]
    do

      count=`expr $count + 1`
      echo "UNION"
      echo "select $max from dual"

    done
    echo "/"
    echo exit
  } | sqlplus 'scott/tiger'
  max=`expr $max + 1000`
done

Best regards,

Carel-Jan Engel

===
If you think education is expensive, try ignorance. (Derek Bok) ===

On Tue, 2005-03-22 at 09:35, Denys van Kempen wrote:

> Does anybody know if there is a limit to the number of UNION operators
> allowed in a SELECT?
>
> Could not find any mention of an upper limit in the documentation or
> issues with queries using a large number of operator in Metalink.
>
> Thanks,
>
> Denys
> --
> http://www.freelists.org/webpage/oracle-l

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 22 2005 - 04:50:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US