Hope all is well. I have a table with about 491,000 unique records in a SQL server database. I need to run these records against another table in Oracle database. The problem I have in Oracle is it can on filter 1000 records at a time. Here is the query and its error:
SELECT *
FROM TABLE1
WHERE ID IN(A LIST OF 1001 RECORDS)
[Error] Script lines: 1-4 -------------------------- ORA-01795: maximum number of expressions in a list is 1000 Script line 3, statement line 3, column 11017
I can use the following query to run for couple thousand records but not sure how to do it with 491000 records.
SELECT ID
FROM TABLE2
WHERE ( ID IN(LIST OF 1000 RECORDS)
OR ID IN(LIST OF ANOTHER 1000 RECORDS)
OR ID IN(LIST OF ANOTHER 1000 RECORDS)
OR ID IN(LIST OF ANOTHER 1000 RECORDS))
Could anyone helpe me this this problem?
Many thanks
Forget to mention, I do not have privillage to create tables in Oracle database.
between 1 and 491000?count(*)andwhere rownum < 1000are for while testing something ;))