Query question

Sully38

Board Regular
Joined
Mar 9, 2004
Messages
167
I have two tables( Table A & B) and need to display all the records in [Table A] where [field 1.table A] = [field 1. Table B] or [field 2. Table B] or [field 3. Table B] . I keep getting errors trying to use an OR within my inner join, is there a catch to hitting on multiple fields?
Any help is appreciated!

:rolleyes:
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi,

How about this?

Code:
SELECT TableA.Field1 FROM TableA, TableB 
WHERE (((TableA.Field1)=[TableB]![Field1]
 Or (TableA.Field1)=[TableB]![Field2]
 Or (TableA.Field1)=[TableB]![Field3]));

HTH
 
Upvote 0
I owe you .. good suggestion, EXACTLY WHAT I WAS LOOKING FOR!! It's amazing how proper syntax corrects all...
(y)
 
Upvote 0

Forum statistics

Threads
1,221,704
Messages
6,161,390
Members
451,701
Latest member
ckrings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top