table 1 model, arrivals, shipments
table 2 models, arrivals, shipments
some models are in table 1 but not in table 2, and some models are in table2 but not table 1
I need this output
model(either tbl1 or 2), tbl1arrival, tbl1shipments, tbl2arrival, tbl2shipments.
i.e. I need one line for each model and the corresponding arrival and shipments, regardless of the table the value is stored in.
I wrote this
SELECT model, arrivals, shipments
From tbl1
UNION
SELECT model,ARRIVAL, shipments
FROM tbl2
this gives me
tbl1model,tbl1arrival, tbl1shipments
tbl2model, tbl2arrival, tbl2shipments
etc
any help is appreciated. thanks
table 2 models, arrivals, shipments
some models are in table 1 but not in table 2, and some models are in table2 but not table 1
I need this output
model(either tbl1 or 2), tbl1arrival, tbl1shipments, tbl2arrival, tbl2shipments.
i.e. I need one line for each model and the corresponding arrival and shipments, regardless of the table the value is stored in.
I wrote this
SELECT model, arrivals, shipments
From tbl1
UNION
SELECT model,ARRIVAL, shipments
FROM tbl2
this gives me
tbl1model,tbl1arrival, tbl1shipments
tbl2model, tbl2arrival, tbl2shipments
etc
any help is appreciated. thanks