[thelist] CFQuery sub search...
Ron Thigpen
rthigpen at nc.rr.com
Fri Nov 2 12:57:54 CST 2001
the chunked group of IN statements should use the OR operator. no one
record is going to have its PK appear in more than one of the chunks.
perhaps like this:
SELECT [whatever]
FROM [whereever]
WHERE [however_criteria]
AND (id IN (1,5,10,12, ... 327, 329)
OR id IN (...)
...
OR id IN (4679, 4690, 4845, 4849, 4960))
--rt
Joshua Olson wrote:
> Susan,
>
> Jeff's tip uses an array as an intermediate step to change:
>
> 1,5,10,12, ... 4845, 4849, 4960
>
> into something like
>
> 1,5,10,12, ... 327, 329)
> AND id IN (342, 347, 389, ..., 624, 626)
> ...
> AND id IN (4679, 4690, 4845, 4849, 4960
>
>
More information about the thelist
mailing list