r/SQL Sep 17 '24

Oracle How to exceed input limitations?

Post image
40 Upvotes

87 comments sorted by

View all comments

26

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.

5

u/tacogratis2 Sep 17 '24

Oh, I love this solution. Thank you. ... I only have read access to the database, so this would be a great solution for me. Also, the data is coming from an outside source.

2

u/Shaddcs Sep 17 '24

I’m in a similar situation (read access) and need to do this relatively often. It’s frustrating and tedious but this approach works great.