Union or Union All

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

FSUrules2883

I am trying to combine two tables into one but when I try to combine
the text fields it gives me null values

Table A
Customer SalesPerson TEXT TEXT2
A B ABCD
EFGH
B C BCDE
FGHI
A
 
You hit the send key too early.
You only posted data from one table and then no results of the union query.
You did not post your query SQL.
I can not see into to the other screens on your computer.
 
SELECT [Collections88].CUSTNMBR, [KevinCollections88].TEXT,
[KevinCollections88].TEXT2
FROM [Collections88];
UNION ALL
SELECT [Collections99].CUSTNMBR, [KevinCollections99].TEXT,
[KevinCollections99].TEXT2
FROM [Collections99];
 
Try surrounding TEXT with brackets. I suspect that TEXT may be a reserved
word and could be causing the problem.

SELECT [Collections88].CUSTNMBR
, [Collections88].[TEXT]
, [Collections88].TEXT2
FROM [Collections88];
UNION ALL
SELECT [KevinCollections99].CUSTNMBR, [KevinCollections99].[TEXT],
[KevinCollections99].TEXT2
FROM [KevinCollections99];

Note that your table in the first query is Collections88 but you refer to
KevenCollections88 as the tablename in the SELECT clause.
You do similar naming errors in the second query

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
According to your SQL you have four (4) tables --
[Collections88]
[KevinCollections88]
[Collections99]
[KevinCollections99]

but only two are in the FROM lines of the query.

Another thing wrong is that you have a semicolon in the middle of the query.
Only ONE semicolon allowed and that is to end the query.
 
Back
Top