MS Access question!

Author
Discussion

darrent

Original Poster:

630 posts

266 months

Thursday 7th August 2003
quotequote all
Guys,

I have the exact same problem as Graham had in his post today;
www.pistonheads.com/gassing/topic.asp?t=51625&f=95&h=0

Basically have two lists and want to identify values that are the same in both lists.

Only difference is that because my 2 lists are over the maximum rows allowed in Excess I need to do it in Access - any ideas how to do it.

Cheers
D

judas

6,069 posts

266 months

Thursday 7th August 2003
quotequote all
Can't you just link the two tables together using the ID fields as keys?

pdV6

16,442 posts

268 months

Thursday 7th August 2003
quotequote all
select list1.[ID] as List1ID, list2.[ID] as List2ID from List1 inner join List2 on List1.[ID]=List2.[ID]

ben789

126 posts

270 months

Thursday 7th August 2003
quotequote all
SELECT DISTINCT Table1.val
FROM Table1, Table2
WHERE Table1.val=Table2.val;




>> Edited by ben789 on Thursday 7th August 16:21

darrent

Original Poster:

630 posts

266 months

Thursday 7th August 2003
quotequote all
Guys,

Thank you all - one small point I forgot to mention was that I know sod all about access to your replies mean nothing to me!

Anyone able to talk English and explain how to do it??

ben789

126 posts

270 months

Thursday 7th August 2003
quotequote all
Darren,

have you got your database setup with all the tables and stuff?

If so, click on "Queries" in access, then "Create query in design view", then Close (if it asks you which tables to add). Then use the View menu to change into SQL mode and stick in the code, and amend it so it correctly reflects your table names/fields.

Then you can goto the Query menu and click on run


>> Edited by ben789 on Thursday 7th August 16:43

darrent

Original Poster:

630 posts

266 months

Thursday 7th August 2003
quotequote all
Cheers Ben, think I can manage that!

smeagol

1,947 posts

291 months

Thursday 7th August 2003
quotequote all
I wouldn't bither with the SQL stuff, do it the simple way:

Start access have the two seperate tables.
Go to queries
New, design view.
Add the two tables (by selecting and clicking add). Then click button close.
You'll see two lists (ie both tables)
Drag the field you want to be equal from one table to the next table. A line will appear between the two fields and they will be linked so that only fields in both tables wil be shown.
Finally drag the fields you want into the main part at the bottom. (Quick way of you want all the fields from a table is to double click on the title and they will all be highlighted and can be dragged down)
Run query (by clicking on the ! button) and there you go.

Hope that helps.