query

  • Thread starter Need help for query
  • Start date
N

Need help for query

Please help...
I have 2 tables: table1 contains people name column and number column,
table2 contains text description of the numbers in table1. I would like to
query the number column to show as text description of these numbers. Ex: #1
= a, #2 = B, #3 = C..... How can I do that?
Thanks
 
B

Ben

Assuming you have in Tbl1:

Name Num
Jack 1
Jill 2
Joe 3
Jane 4

Tbl2 you have
Num Desc
1 co-worker
2 friend
3 cousin
4 in-law

Then you do something like this:

SELECT tbl1.name, tbl2.Desc
FROM tbl1 INNER JOIN tbl2 on tbl1.Num=tbl2.Num



Ben
 
J

John W. Vinson

On Fri, 20 Feb 2009 02:33:00 -0800, Need help for query <Need help for
Please help...
I have 2 tables: table1 contains people name column and number column,
table2 contains text description of the numbers in table1. I would like to
query the number column to show as text description of these numbers. Ex: #1
= a, #2 = B, #3 = C..... How can I do that?
Thanks

Create a new Query. Add Table1 and Table2 to the query grid. If Access doesn't
do so for you automatically, join the two tables by dragging the number field
from Table1 to the number field in Table2.

Select whichever fields from either table you want to see.

Open the query by clicking the datasheet icon (to check that it's working OK);
you can then base a Form or a Report on the query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top