Re: maximum number of expressions in a list is 1000

From: Niall Litchfield <niall.litchfield_at_gmail.com>
Date: Wed, 2 Jan 2013 10:40:58 +0000
Message-ID: <CABe10saekSDee+n01ZF1ytYfbhEDqBmS-nTepF9qbwsPNp=t0g_at_mail.gmail.com>



On Wed, Jan 2, 2013 at 10:22 AM, Norman Dunbar <oracle_at_dunbar-it.co.uk>wrote:
> > Is there a workaround to avoid this error in oracle?
>

> To work around it, you simply have to replace the individual IDs with a
> query, as in:
>
> SELECT id, name from anagrafica WHERE id in (
> SELECT id FROM ....
> WHERE something ....
> )
>
>

or even try approaching that problem as

select <the columns I really want in the end> from t1 JOIN t2
where FILTER

replacing JOIN and FILTER as appropriate.

ISTM that the most appropriate answer to the original question will depend upon where your list of ID values actually comes from. You may well find Adrian Billington's article on binding in lists useful as well. http://www.oracle-developer.net/display.php?id=301

-- 
Niall Litchfield
Oracle DBA
http://www.orawin.info


--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jan 02 2013 - 11:40:58 CET

Original text of this message