G
Guest
Greetings,
I would like to write a query that performs a conditional join. In Table A
are several fields, including one called "Company". If the value of Company
is 1, then I want to join Table A to Table B. If the value of Company is 2,
then I want to join Table A to Table C. (Table B and Table C have the same
structure.) The rest of the query is simple - just selecting fields from A
and (B or C).
Can this be done in one query, or do I have to have two queries?
Thanks,
George
I would like to write a query that performs a conditional join. In Table A
are several fields, including one called "Company". If the value of Company
is 1, then I want to join Table A to Table B. If the value of Company is 2,
then I want to join Table A to Table C. (Table B and Table C have the same
structure.) The rest of the query is simple - just selecting fields from A
and (B or C).
Can this be done in one query, or do I have to have two queries?
Thanks,
George