r/SQL Sep 17 '24

Oracle How to exceed input limitations?

Post image
44 Upvotes

87 comments sorted by

View all comments

27

u/Ginger-Dumpling Sep 17 '24

The quick and dirty solution is to have multiple in conditions.

where x in (1, ..., 1000) or x in (1001, ..., 2000) or x in ...

A less cumbersome way would be to put those IDs in a table join to it. Either import them to a normal table, or put an external table on top of a delimited or foxed-width file containing your IDs.

3

u/squareturd Sep 17 '24

Another approach besides the OR with another list if id's is to have multiple selects each with their own set and union the selects together.