I have two tables:
Table1: id1, field1, field2, field3
Table2: id2, field1, field3
What I need is:
"select id2 from table2 where field1 = x and field3 = y;"
if it returns empty then perform and process the results from:
"select field2 from table1 where field1 = x and field3 = y;"
Is there a way to perform this in a single query in SQLite?
Assuming that the tables are joinable on
field1andfield3, then something like this should work (Warning: Untested):