Conditional Join

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
You could do it in VBA and create the SQL on the fly, or use multiple
queries.
 
Back
Top