M
mark
You're not real clear as to what you're trying to
accomplish, so I cannot say for sure whether a Union query
will do the job for you. Assuming it will, the syntax is
pretty straightforward:
Select x, y, z, null, null
From TableA
Where [criteria]
Union
Select a, b, c, d, e
From TableB
Where [criteria]
In a union query, you need to have the same number of
fields selected in both parts of the union. In this
example, we are selecting 5 fields from table B and only 3
from A, so we insert 'null' in place of the non-existent
fields in order to "match" the 5 fields.
Hope that helps!
accomplish, so I cannot say for sure whether a Union query
will do the job for you. Assuming it will, the syntax is
pretty straightforward:
Select x, y, z, null, null
From TableA
Where [criteria]
Union
Select a, b, c, d, e
From TableB
Where [criteria]
In a union query, you need to have the same number of
fields selected in both parts of the union. In this
example, we are selecting 5 fields from table B and only 3
from A, so we insert 'null' in place of the non-existent
fields in order to "match" the 5 fields.
Hope that helps!