Using TOracleQuery, I'd like to select all records, for which a column's value is in a specified range.
Using the SQL IN sub-clause is inefficient and limited to a maximum allowed number of items (typically 1000). The most efficient way should be to use array variables:
SELECT * FROM CUSTOMER
WHERE CUSTOMER_ID = :ids
Unfortunately, when I use variant arrays with SELECT statements, such as the example above, the only records fetched are those with CUSTOMER_ID equal to the first item in the array.
What am I doing wrong ?
Thanks,
Lev
Using the SQL IN sub-clause is inefficient and limited to a maximum allowed number of items (typically 1000). The most efficient way should be to use array variables:
SELECT * FROM CUSTOMER
WHERE CUSTOMER_ID = :ids
Unfortunately, when I use variant arrays with SELECT statements, such as the example above, the only records fetched are those with CUSTOMER_ID equal to the first item in the array.
What am I doing wrong ?
Thanks,
Lev