In <CvEzx7.Jz7@Newbridge.COM> psingh@Newbridge.COM (Pawan Singh) writes:
| For example, I have a table A and depending on a type column
| in A, one can find extra information in B or C. For example
| table A can be employees and table B and C can be managers
| and others.
| Now I want to frame a query which returns me A.x, A.y, B.z
| or A.x, A.y, C.zz, depending upon the value of A.a.
select A.x, A.y, B.z from A, B where A.a = some_value
UNION
select A.x, A.y, C.zz from A, C where A.a = some_other_value
--
Qing Vincent Yin | Repeat
umyin@mctrf.mb.ca | delete(next_bug);
| Until 0 = 1;