Hello, I am trying to query results through a union statment below. The only problem is that the query returns a error saying "The number of columns in the two selected tables or queries of a union query do
not match" Here is the code below. Can anyone help? Thank you
SELECT [A Co HBL Connecting Flights].Unit, [A Co HBL Connecting Flights].Grade, [A Co HBL Connecting Flights].LName, [A Co HBL Connecting Flights].FName, [A Co HBL Connecting Flights].[Connecting Flights].Value AS [HUB1]
FROM [A Co HBL Connecting Flights];
UNION SELECT [B Co HBL Connecting Flights].Unit, [B Co HBL Connecting Flights].Grade, [B Co HBL Connecting Flights].LName, [B Co HBL Connecting Flights].FName, [B Co HBL Connecting Flights].[Connecting Flights].Value
FROM [B Co HBL Connecting Flights];
UNION SELECT [C Co HBL Connecting Flights].Unit, [C Co HBL Connecting Flights].Grade, [C Co HBL Connecting Flights].LName, [C Co HBL Connecting Flights].FName, [C Co HBL Connecting Flights].[Connecting Flights].Value
FROM [C Co HBL Connecting Flights];
UNION SELECT [D Co HBL Connecting Flights].Unit, [D Co HBL Connecting Flights].Grade, [D Co HBL Connecting Flights].LName, [D Co HBL Connecting Flights].FName, [D Co HBL Connecting Flights].[Connecting Flights].Value
FROM [D Co HBL Connecting Flights];
UNION SELECT [E Co HBL Connecting Flights].Unit, [E Co HBL Connecting Flights].Grade, [E Co HBL Connecting Flights].LName, [E Co HBL Connecting Flights].FName, [E Co HBL Connecting Flights].[Connecting Flights].Value
FROM [E Co HBL Connecting Flights];
UNION SELECT [F Co HBL Connecting Flights].Unit, [F Co HBL Connecting Flights].Grade, [F Co HBL Connecting Flights].LName, [F Co HBL Connecting Flights].FName, [F Co HBL Connecting Flights].[Connecting Flights].Value
FROM [F Co HBL Connecting Flights];