By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,790 Members | 1,409 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,790 IT Pros & Developers. It's quick & easy.

Help with queries

P: 10
Hi,
I am very much new working on Access database. I have 2 tables,

My first table is like
No's colors made
1 blue nissan
2 red corolla

My second table is like
No's colors car
1 blue sentra
1 red altima
1 green maxima
2 blue corolla
2 red camry

I now want my output table to be

No's colors made car
1 blue nissan sentra
2 red corolla camry
Feb 17 '09 #1
Share this Question
Share on Google+
4 Replies


Expert 100+
P: 1,287
There seems to be no relationship between your tables. What is the basis for your output?
Feb 17 '09 #2

P: 10
I need to have the No's and colors coloums from my first table... here the No's columns is set as a primary key.... I need my new table with first 3 columns of the first table as it is and my fourth column of the new table should be from my second table, with only those fields that are present from the No's and colors column of the first table...

for example...
my first table has No's 1 and color blue
and my second table has only one record with No's 1 and color blue.... and it has got sentra as the car...
so for each corrosponding No's and colors from the first table... i need to extract car from my second table.......
Feb 17 '09 #3

Expert 100+
P: 1,287
In that case,
1. Go to query design
2. Add both tables
3. Drag the number field from table 1 to the number field in table 2 to create the link that says they have to be equal.
4. Drag the colors field from table 1 to the colors field on table 2.
5. Double click all the fields in table 1 to add them to the resulting query.
6. Double click the car field in table 2 to add to the result.
7. And execute.
Feb 17 '09 #4

NeoPa
Expert Mod 15k+
P: 31,418
I must warn you that your table design is almost certainly going to cause you problems in future (unless your project is extremely limited in scope).

Please check out theis very helpful article (Normalisation and Table structures). If you plan to proceed with any kind of database work this is essential reading.
Feb 18 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.