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

Home -> Community -> Usenet -> c.d.o.server -> Re: Maximun number of unions in a single query

Re: Maximun number of unions in a single query

From: Andreas Sheriff <spamcontrol_at_iion.com>
Date: Wed, 8 Jun 2005 16:58:45 -0700
Message-ID: <XCLpe.9192$tr.2731@fed1read03>


Wow!

Those were some great responses based on such a simple question. I feel honored to have inspired the blighter side of the human spirit.

As for mendicant, yes I did mean the lexical definition. To call someone an a$$h0le does not abide by the geek's book of insults.

Ok, all. So here it is. This is the reason that I asked what some have considered an absurd question (I thought there were no dumb questions?)

I'm working with an application that does multiple inserts into a table.

As a base of knowledge, I'm working with Oracle 8i (8.1.5) and ColdFusion (CF); both of which are on separate machines connected by a 100BT. Yes, you can stop laughing now. I wasn't here when CF was originally purchased.

Here's what I want to accomplish:

insert into mytable(col1, col2, col3, col4)

select  :1,  :2,   :3,    :4 from dual union all
select  :5,  :6,    :7,   :8 from dual union all
select  :9, :10, :11, :12 from dual union all
select :13, :14,:15, :16 from dual union all etc...

It seems to me that this method of inserting data into a table using one insert statement
would be a hell-of-a-lot better than doing multiple insert statement between <cfquery></cfquery>.
And there would be no sorting because I'm using an UNION ALL.

Now you know the reasoning behind my question and now you *all* can stop the flaming, or have I poured kerosene on the whole situation?

-- 
Andreas
Oracle Certified DBA and PL/SQL Developer

"If you don't eat your meat, you cannot have any pudding.
"How can you have any pudding if you don't eat your meat?!?!"
---

WARNING:
DO NOT REPLY TO THIS EMAIL
Reply to me only on this newsgroup
<fitzjarrell_at_cox.net> wrote in message 
news:1118178662.200199.225250_at_g44g2000cwa.googlegroups.com...

>
>
> Andreas Sheriff wrote:
>> Hey now,
>> That's not nice.
>>
>> You don't even know what I'm using multiple unions for.
>> Instead you jump to conclusions like the mendicant you are.
>>
>> --
>> Andreas
>> Oracle Certified DBA and PL/SQL Developer
>>
>> "If you don't eat your meat, you cannot have any pudding.
>> "How can you have any pudding if you don't eat your meat?!?!"
>> ---
>>
>> WARNING:
>> DO NOT REPLY TO THIS EMAIL
>> Reply to me only on this newsgroup
>> <fitzjarrell_at_cox.net> wrote in message
>> news:1118148490.504932.143480_at_g44g2000cwa.googlegroups.com...
>> >
>> >
>> > Billy wrote:
>> >> Andreas Sheriff wrote:
>> >> > Does anyone know the maximum number of unions you can use in a SQL
>> >> > query?
>> >>
>> >> Oh, that is easy. It is directly related to the idiot factor of the
>> >> writer of the SQL.
>> >>
>> >> --
>> >> Billy
>> >
>> > OR we can run with this quite accurate assessment of the situation.
>> >
>> > My vote says this is the optimal response.
>> >
>> >
>> > David Fitzjarrell
>> >
>
> You truly have given us no other choice, have you? Mind-reading is not
> a passtime in which we engage, and you've certainly provided no
> information on WHY such information is so important to you. Possibly
> another solution could be presented should one know WHAT you are
> intending to accomplish. Of course, since you haven't seen fit to
> dispense with such a description of your 'problem' you have absolutely
> no reason to respond as you have done. And I've yet to understand why
> any respondent to this thread is considered by you to be a 'beggar',
> unless you're unclear upon the meaning of the word 'mendicant'.
>
> When, and if, you will provide your rationale for asking such a
> question possibly a suitable solution can be presented.
>
>
> David Fitzjarrell
>
Received on Wed Jun 08 2005 - 18:58:45 CDT

Original text of this message

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