Solved Query two tables with different field header Name.. (1 Viewer)

Number11

Member
Local time
Today, 00:02
Joined
Jan 29, 2020
Messages
607
I am tying to find a way on how I can create a query from two tables and combine the results the fields are

Table name: Model_Elec
Field names: Postcode (text)
Field names: CustomerID (number)
and
Table named:Model_Elec1
Field names: Postcode (text)
Field Names:CustomerAC (number)
 
Last edited:

Minty

AWF VIP
Local time
Today, 00:02
Joined
Jul 26, 2013
Messages
10,371
You can't have the table in the same database with the same name?
So the example given isn't correct or you haven't given us the whole story... :unsure:
 

Number11

Member
Local time
Today, 00:02
Joined
Jan 29, 2020
Messages
607
You can't have the table in the same database with the same name?
So the example given isn't correct or you haven't given us the whole story... :unsure:
it doesnt have the same name one is called "Model_Elec" and the second is called "Model_Elec1"
 

G37Sam

Registered User.
Local time
Today, 03:02
Joined
Apr 23, 2008
Messages
454
Something like this?

Code:
SELECT Postcode, CustomerID FROM Model_Elec
UNION
SELECT Postcode, CustomerAC FROM Model_Elec1
 

Minty

AWF VIP
Local time
Today, 00:02
Joined
Jul 26, 2013
Messages
10,371
Okay - so after the edit - you can do the following

Code:
SELECT Postcode, CustomerID
From Model_Elec
Union
SELECT Postcode, CustomerAC
From Model_Elec1
 

Users who are viewing this thread

Top Bottom