• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 799
  • Last Modified:

need to make a "flat file" query from MS Access or MSSQL 2005 database

Hi, I need to make a "flat file" from two database table. The attached files show a simple two table database. Both tables are related by the "phone" column. The "master-addresses-and-phones.xls" file is a list of phone numbers and addresses. The phone number in this table is the primary key. The "master-name-and-phones.xls" file list of names and phone numbers. the "query-results.xls" file is the desired result.

Basicly, I need to put all the people's names in the same row with the correct address/phone related by the phone number. Some relations can have one name and other could have 8-10.

I am working in MS Access, but could set this up in MSSQL 2005 as well. Thanks for any tips.
Mark B
Mark B
1 Solution
Try this sample. Open query Q. Query Q1 is inserted into Q's SQL, but you can use it also separately.
Mark BDirector ITAuthor Commented:
That is the solution. Will take some time to apply to the more complex database we have, but makes sense and will learn something new!

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now