Query troubles

dsundy2003

New Member
Joined
Dec 26, 2002
Messages
40
I should know this, but alas, I am stuck.
I have 2 tables. One big one, and one small one. The big table has customer #, contract # and equipment description. The smaller table has just customer & contract #.
I want to write a query in access thats gives me all the customer, contrac numbers & description where all the customers & contracts in the one table equals the other.

I think my hassle is that cusomer number and contract number are 2 fields. If I could concatenate them into one field, then my lookup would be eisier.

How would I write a query (not using the concatenate option ) ?

Thanks

D
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hullo. Aside from the fact that you should think about normalizing your structure :) try this:
Code:
SELECT BIG.[Customer#], BIG.[Contract#], BIG.EquipDescr
FROM BIG INNER JOIN SMALL ON (BIG.[Contract#] = SMALL.[Contract#]) AND (BIG.[Customer#] = SMALL.[Customer#]);

HTH (y)

P
 
Upvote 0

Forum statistics

Threads
1,221,532
Messages
6,160,381
Members
451,643
Latest member
nachohoyu

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