Dear Group
I'd be grateful if you can send me on the right track in achieving this.
I have three tables A,B,C outlined as follows:
Table: A
Field: RowID
Field: EntityID
Field: TypeIdentifier
Table: B
Field: RowID
Field: Name
Table: C
Field: RowID
Field: Name
Let's assume I've the following records:
Table A:
1,1,0
2,1,1
Table B:
1,Smith
Table C:
1,XYZCorporation
The table joins are as follows:
A.EntityID = B.RowID
A.EntityID = C.RowID
I would like to select all records from Table A and display the Names from
either Table B or Table C, depending on the Field TypeIdentifier.
E.g.: SELECT Name FROM A JOIN B ON (A.EntityID = B.RowID) JOIN C ON
(A.EntityID = C.RowID) IF TypeIdentifier = 0 SELECT Name FROM B IF
TypeIdentifier = 1 SELECT Name FROM C
Resultset:
Smith
XYZCorporation
Is this somehow possible?
Thanks very much for your time & efforts!
Martin