Unanswered: Multiple view from a single select statement
I want to write an SQL query which should return me 2 kinds of outputs depending on which condition is true. i.e.
the query should be something like
select someview if (condition1 = true)
else select someotherview if (condition2 = true)
where someview is a set of columns from one table only, and someotherview is a set of columns which is a superset of someview (& is generated from two tables, which have no common field)
Let me explain this further --
I want to select data from one table and a single field from other table, however if I the first table does not return any data, I still want data from the other table to be returned.
Can I write a SQL query to do this?