Oracle BETWEEN from subquery
Is something like this possible?
SELECT *
FROM [TABLE1]
WHERE [FIELDA] BETWEEN
(SELECT [FIELDB], [FIELDC]
FROM [TABLE2]
WHERE [set of conditions to ensure single record]);
Instead of doing:
SELECT *
FROM [TABLE1]
WHERE [FIELDA]
BETWEEN (SELECT [FIELDB] FROM [TABLE2] WHERE [set of conditions to ensure single record])
AND (SELECT [FIELDB] FROM [TABLE2] WHERE [set of conditions to ensure single record]);
Thanks,
from Recent Questions - Stack Overflow https://ift.tt/3BvTUNw
https://ift.tt/eA8V8J
Comments
Post a Comment