Data from two tables

J

JOUIOUI

I have two tables, one titled CCPmtA and CCPmtB. Each table has the same
column headings. I only want to incorporate the following columns from each
table into a query or another table for a report I want to create. The
columns I need from each table are: PmtType, Amount, TableID. What is the
best way for me to combine this information so I can create a report with
this column information. I haven’t worked with Access in about 2 years and
am a little bit rusty, I appreciate your help, thank you.
 
A

Allen Browne

You can combine the data from 2 tables into one long list with a UNION
query.

Access can't show this kind of query graphically, so you will have to type
it in. Additionally, UNION queries are read only (okay for your report, but
not editable in a form.)

1.Create a new query.

2. Switch to SQL View (View menu.)

3. Enter something like this:
SELECT PmtType, Amount, TableID
FROM CCPmtA
UNION ALL
SELECT PmtType, Amount, TableID
FROM CCPmtA;

Long term, the better solution might be to combine the 2 tables into one,
with an extra field to indicate whatever is the difference between the 2.
 

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