I have a requirement for a query. It needs to select every number from a list that IS NOT present in a column. Currently, I have this working fine. This query returns every number between
that is not present in the
SELECT LEVEL + 1833
CONNECT BY LEVEL <= (2000 - 1833)
WHERE ID_TX BETWEEN 1834 AND 2000;
What I want to do is make this as user-friendly as possible. To do that, I can enter two variables, a
. Now my query looks like this.
SELECT LEVEL + &STARTING_ID
CONNECT BY LEVEL <= &LIST_LENGTH
WHERE ID_TX BETWEEN &STARTING_ID AND &STARTING_ID + &LIST_LENGTH;
At first, I was using
, but then I could only use this query once.
couldn't be placed in the code block, and wasn't cleaning my variables anyway. Now my issue is that it considers each
variable to be different, so it's making the user enter 5 variables instead of 2.
How do I make it where I'm still using temporary variables (with or without the popup to enter the variable), but the person running the query only has to enter two values