P
PatK
Hi...hope someone has an idea about how to do this easily.
I have two tables. Table1 has ~75 fields/columns. Table 2 has ~50
fields/columns. The two tables have columns named the same (I would estimate
approximately 30 fields have common names). While there are common fields,
the are not "in order" ie, field for field match, starting with column 1.
Example:
Table 1:
Field A Field B Field C Field D Field E
Table 2:
Field A Field 1 Field E Field 2
I want to create a query that, once run, I will have (not necessarily in any
order):
Field A Field B Field C Field D Field E Field 1 Field 2
A record from Table2, once the union occurs, would have "blank or null" data
in those fields not in common with Table 1 (and vice versa).
Note: Field A would be primary key, and unique in the output table. In
other words, Table2 would not have a row with the same Field A value in it,
as Table1.
I am about to embark on creating a monsterously long query of Tables 1 and
2, to get two new queries that have "aligned" rows, then do a union on them,
once I get all the columns perfectly aligned and filled with blank/null data,
as need, so the union will work. But I figure...gosh...there must be an
eaiser way.
Thanks...trying to do this a bit more elegantly than my noobiness allows.
Thanks!
patk
I have two tables. Table1 has ~75 fields/columns. Table 2 has ~50
fields/columns. The two tables have columns named the same (I would estimate
approximately 30 fields have common names). While there are common fields,
the are not "in order" ie, field for field match, starting with column 1.
Example:
Table 1:
Field A Field B Field C Field D Field E
Table 2:
Field A Field 1 Field E Field 2
I want to create a query that, once run, I will have (not necessarily in any
order):
Field A Field B Field C Field D Field E Field 1 Field 2
A record from Table2, once the union occurs, would have "blank or null" data
in those fields not in common with Table 1 (and vice versa).
Note: Field A would be primary key, and unique in the output table. In
other words, Table2 would not have a row with the same Field A value in it,
as Table1.
I am about to embark on creating a monsterously long query of Tables 1 and
2, to get two new queries that have "aligned" rows, then do a union on them,
once I get all the columns perfectly aligned and filled with blank/null data,
as need, so the union will work. But I figure...gosh...there must be an
eaiser way.
Thanks...trying to do this a bit more elegantly than my noobiness allows.
Thanks!
patk