I figured out that we can retrieve records from an Oracle table with batch inputs as follows:
SELECT
*
FROM
invoices
WHERE
(invoice_id, entity_id) IN
(
(1, 101),
(2, 102),
(3, 102)
)
Now, I need to fire a query where the input for one of the columns is immaterial, but still be able to do batch querying.
E.g.
SELECT
*
FROM
invoices
WHERE
(invoice_id, entity_id, vendor_id) IN
(
(1, 101, 201),
(2, 102, 202),
-- no criteria on vendor_id for the tuple below
(3, 102)
)
If I run this query, the query engine reports the following error:
ERROR at line 1:
ORA-00920: invalid relational operator
Is it possible to do such a query in the first place? If so, how?
Oracle: Expression Lists:
You can separate these conditions: