[AccessD] Basic Question

Susan Harkins ssharkins at gmail.com
Wed May 27 13:07:20 CDT 2009


UNION isn't a join, it's an operator. You should get a record for each 
record in the dataset. You're not matching data, you're just dumping data 
from multiple tables into the same dataset.

Now, I do believe there's something in there about duplicates????? I'd have 
to look it up and I'm just not sure, because there's UNION and UNION ALL.

Susan H.

>
> I have a basic question for you.  Quite a few times, in the past, I've
> used Union Join queries to join different queries into common data.  For
> instance:
>
> select [WBS1], [SumOfFeeBillingCurrency] as [BeginFee], 0 as [EndFee]
> from [qryReportingBacklogFeeBegin]
>
> UNION select [WBS1], 0 as [BeginFee], [SumOfFeeBillingCurrency] as
> [EndFee] from [qryReportingBacklogFeeEnd];
>
> Recently I was testing one.....and discovered that my data result was
> not correct.  I was thinking that with the union join, if one dataset
> did not have matching data, to the other...I would only get one line of
> data.  Otherwise, I should get two lines....which I then summarized in
> another query of this union join.  However, I found that I only got data
> from the datasets, where the select occurred in BOTH sets...([WBS1], in
> the above scenario.)  Is that right??
>
> Keith Williamson | Associate, Asst. Controller | kwilliamson at rtkl.com
>
> RTKL Associates Inc. | 901 South Bond St. | Baltimore, MD  21231
>
> 410.537.6098 Direct | 410.276.4232 Fax | www.rtkl.com
>
>
> --------------------------------------------------------------------------
> The information contained in this communication is confidential, may be 
> privileged and is intended for the exclusive use of the above named 
> addressee(s). If you are not the intended recipient(s), you are expressly 
> prohibited from copying, distributing, disseminating, or in any other way 
> using any of the information contained within this communication. If you 
> have received this communication in error, please contact the sender by 
> telephone at (410) 537-6000 or by response via e-mail and permanently 
> delete the original email and any copies.
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com 




More information about the AccessD mailing list