Union Two Tables with Different number of columns

  • Thread starter Thread starter majed via AccessMonster.com
  • Start date Start date
M

majed via AccessMonster.com

Hi,
How can I select a union record set from two tables while having different
number of columns?
 
Place the table that has more fields first, and add a calculated field to
make up for the missing one.

Example:
SELECT F1, F2, F3 FROM Table1
UNION ALL
SELECT F1, F2, Null As F3 FROM Table2;

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
Back
Top