Computing.Net > Forums > Programming > SQL Queries in MS Access

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

SQL Queries in MS Access

Reply to Message Icon

Name: Angilj
Date: June 21, 2003 at 15:08:53 Pacific
OS: XP
CPU/Ram: 900, 256
Comment:

Hello,
I have two tables, one with only phone numbers and the 2nd has Names, Addresses, and Phone Numbers. I need to run a query to see if any of the phone numbers in Table2 match those in Table1. For some reason my syntax is wrong and it will not work. Does anyone have any example for me?
Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Infinite Recursion
Date: June 21, 2003 at 20:23:42 Pacific
Reply:

Angilj,

I think the below syntax is right, sorry
but don't have the software on this machine to test it.

SELECT * FROM TABLE1, TABLE2 WHERE TABLE1.PHONE1 = TABLE2.PHONE2;

Infinite Recursion


0

Response Number 2
Name: Infinite Recursion
Date: June 21, 2003 at 20:24:49 Pacific
Reply:

That will return all record content for the tuples that match based on the phone number field. Hope it helps.

Infinite Recursion


0

Response Number 3
Name: Valskie
Date: June 26, 2003 at 23:48:42 Pacific
Reply:

Angilj,

Try this.

SELECT table1.Name, table1.Addresses, table1.Phone, table2.Phone
FROM table1 INNER JOIN table2
ON table1.Phone = table2.Phone;


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Website statistics Special programing???



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: SQL Queries in MS Access

Reporting in MS Access www.computing.net/answers/programming/reporting-in-ms-access/9371.html

Browse Hard Drive in MS Access Form www.computing.net/answers/programming/browse-hard-drive-in-ms-access-form/9857.html

Reporting in MS Access www.computing.net/answers/programming/reporting-in-ms-access/9225.html