Re: Union Two Tables with Different number of columns
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Sat, 30 Apr 2005 20:08:26 +0800
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.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"majed via AccessMonster.com" <forum@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:0d24f83f3f03469ebc83f469c5572c95@xxxxxxxxxxxxxxxxxxxx
> Hi,
> How can I select a union record set from two tables while having different
> number of columns?
.
- References:
- Union Two Tables with Different number of columns
- From: majed via AccessMonster.com
- Union Two Tables with Different number of columns
- Prev by Date: Union Two Tables with Different number of columns
- Next by Date: Re: How to combine two (or more) records to one?
- Previous by thread: Union Two Tables with Different number of columns
- Next by thread: How to Direct Query Output ?
- Index(es):
Relevant Pages
|
|