[AccessD] Combine two tables

Lembit Soobik lembit.dbamail at t-online.de
Sat Jan 19 09:37:29 CST 2008


Rocky,
I think so, but how does that help me?

I have in the meantime found a way:
without changing a table, I have added a column in the union query,
which is " id - id as tablename " for one table,
and " id - id +1 as tablename " for the other table.

Now I get fro the union query an additional column which shows 0 for one 
table and 1 for the other table.

Thanks anyway
Lembit

----- Original Message ----- 
From: "Rocky Smolin at Beach Access Software" <rockysmolin at bchacc.com>
To: "'Access Developers discussion and problem solving'" 
<accessd at databaseadvisors.com>
Sent: Saturday, January 19, 2008 4:18 PM
Subject: Re: [AccessD] Combine two tables


> Is DISTINCT available to a union query?
>
> Rocky
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Lembit Soobik
> Sent: Saturday, January 19, 2008 7:13 AM
> To: Access Developers discussion and problem solving
> Subject: [AccessD] Combine two tables
>
> Hi, everybody,
>
> In an Access 2002  I have two linked tables, table A is in the BE which
> belongs to this FE, table B is in a different database, and it is used 
> there
> as well.
> Both tables are lists of persons with id, lastname, firstname, and other
> fields.
>
> I want to use names from both tables as customers.
> I have made a union query, but this gives me duplicate id numbers.
>
> Is there a way to insert the source table name into the union query, so 
> that
> I can then distinguish from which table a certain record is?
>
> Or is there a better solution?
>
> Thank you
> Lembit
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.19.7/1232 - Release Date: 1/18/2008
> 7:32 PM
>
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.19.7/1232 - Release Date: 
> 18.01.2008 19:32
>
> 




More information about the AccessD mailing list