SQL Language (MOSC)

MOSC Banner

Multiple value subquery

edited Apr 15, 2016 4:23AM in SQL Language (MOSC) 2 commentsAnswered ✓

Hi

I'm trying to simplify this so it's easy to explain but will probably end up confusing the question. Here goes.

I have a multi table query that needs to return values based on table_n.column being in a list of values.

This list of values is flexible and obtained via a separate query containing Union's. The list currently contains 100+ values.

If I run the query to obtain the list of values, then copy the result into the first query as a giant IN ('1', '2', '3',...) I get rows returned in seconds.

I'd obviously rather merge the two so that I'm not manually running this - in two steps.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center