Combine Data from Two Tables Options

  • Thread starter Thread starter FSUrules2883
  • Start date Start date
F

FSUrules2883

Our company has two databases, one for international customers and one
for US customers. These two table contain the same fields but
seperate data (see below). Is there any way I can creat a query to
show me all the records? Is this possible



Table 1 US Customers
CustomerName SalesRep StartDate
AAA111 A 01/01/08
BBB222 B 05/01/07
CCC333 C 01/01/07

Table 2 International Customers
CustomerName SalesRep StartDate
DDD444 D 01/11/08
EEE555 E 07/01/07
GGG777 G 11/01/07

Query
CustomerName SalesRep StartDate
AAA111 A 01/01/08
BBB222 B 05/01/07
CCC333 C 01/01/07
DDD444 D 01/11/08
EEE555 E 07/01/07
GGG777 G 11/01/07
 
You can use a Union query:

SELECT CustomerName, SalesRep, StartDate
FROM [US Customers]
UNION
SELECT CustomerName, SalesRep, StartDate
FROM [International Customers]

Note, though, that the resultant query will not be updatable.

Realistically, you'd be far better off combining the two tables into one
(with an additional field indicating whether they're US or International)
 
Doug
How would the query be updated? Would i have to run the union query
everytime I wanted to run the report. Sadly I cannot combine the
tables as this was a"higer" up decession that was made.
 
Hi -

You would not need to update the query - is is used only for reporting
purposes. But, yes, you would run the query every time the report was run -
you would make the union query the report recordsource.

John
 
Back
Top