P
PA
Dear All,
I have different 4 queries that I combine them together using union query :
Those 4 queries [A], , [C] and [D] have column as follows: Name,
ID,Date, TotalAmount, TotalError.
The Union Query that I put down as follows:
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM [A]
UNION
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM
UNION
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM [C]
UNION
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM [D];
When I run this Union Query, I got an error message as follows:
The specified field ‘[ID]’ could refer to more than one table listed in the
FROM clause of your SQL statement. (Error 3079)
Would be appreciate if some one could help me as I try so many times it does
not work?
Thanks & Best Regards
PA
Note: If I just run up to query [C],it does work well as follows:
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM [A]
UNION
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM
UNION
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM [C]
I have different 4 queries that I combine them together using union query :
Those 4 queries [A], , [C] and [D] have column as follows: Name,
ID,Date, TotalAmount, TotalError.
The Union Query that I put down as follows:
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM [A]
UNION
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM
UNION
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM [C]
UNION
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM [D];
When I run this Union Query, I got an error message as follows:
The specified field ‘[ID]’ could refer to more than one table listed in the
FROM clause of your SQL statement. (Error 3079)
Would be appreciate if some one could help me as I try so many times it does
not work?
Thanks & Best Regards
PA
Note: If I just run up to query [C],it does work well as follows:
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM [A]
UNION
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM
UNION
SELECT[Name],[ID],[Date],[TotalAmount],[TotalError] FROM [C]