Union or Union All

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
 
K

KARL DEWEY

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.
 
F

FSUrules2883

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

John Spencer

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
..
 
K

KARL DEWEY

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.
 

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

Similar Threads

Union or Union All 2
concatenate 1
Union Query 7
Union Query with 3 tables 3
Union Query 7
Need helps on my union query 3
union query issue 3
UNION ALL Query 14

Top