If I have the following...
SELECT DISTINCT STREET
FROM TableA
UNION
SELECT DISTINCT STREET DEPENDENT_STREET
FROM TableA
WHERE STREET IS NOT NULL AND DEPENDENT_STREET IS NOT NULL
...and for each result returned I want to do
SELECT TEXT_ID
FROM TableB
WHERE STREET=['a parameter I will specify']
How would I combine the two into a single statement? Is it possible, or is it a bit too complicated?
Thanks for your help!
SELECT DISTINCT STREET
FROM TableA
UNION
SELECT DISTINCT STREET DEPENDENT_STREET
FROM TableA
WHERE STREET IS NOT NULL AND DEPENDENT_STREET IS NOT NULL
...and for each result returned I want to do
SELECT TEXT_ID
FROM TableB
WHERE STREET=['a parameter I will specify']
How would I combine the two into a single statement? Is it possible, or is it a bit too complicated?
Thanks for your help!
