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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL statement is to large, and creates a error

Re: SQL statement is to large, and creates a error

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Fri, 04 Nov 2005 19:38:43 +0100
Message-ID: <dkg9a5$bpi$4@news2.zwoll1.ov.home.nl>


jimi_xyz_at_hotmail.com wrote:

> jimi_xyz_at_hotmail.com wrote:
> 

>>So, do you recommend creating a kind of temp table, that contains all
>>of the project ids?
>>
>>
>>Frank van Bortel wrote:
>>
>>>Maxim Demenko wrote:
>>>
>>>>jimi_xyz_at_hotmail.com schrieb:
>>>>
>>>>
>>>>>NOTE: There is about 1884 values within the IN () function. AND..
>>>>
>>>>
>>>>>Any help/ideas will do.
>>>>>
>>>>>Thanks Inadvance
>>>>>Jimi
>>>>>
>>>>
>>>>Maybe this helps
>>>>http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/expressions014.htm#sthref2245
>>>>
>>>>
>>>><quote>
>>>>A comma-delimited list of expressions can contain no more than 1000
>>>>expressions. A comma-delimited list of sets of expressions can contain
>>>>any number of sets, but each set can contain no more than 1000 expressions.
>>>></quote>
>>>>
>>>>Best regards
>>>>
>>>>Maxim
>>>
>>>And with reason, I'd say.
>>>
>>>Having 1000 (or more - as you have) elements in such an IN list
>>>triggers the thought you are missing a table that can be referenced
>>>through a foreign key.
>>>More efficient than an IN list, too.
>>>
>>>So, rethink the design.
>>>
>>>--
>>>Regards,
>>>Frank van Bortel
>>>
>>>Top-posting is one way to shut me up...
> 
> 
> 
> 
> IM sorry didn't mean to top post.
> 
> Jimmie
> 

Actually, a table - not temporary at all. A proper reference table, that's what seems to be missing.
You can then add a join, no matter how many values are involved.
-- 
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Received on Fri Nov 04 2005 - 12:38:43 CST

Original text of this message

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