Re: A query that joins 2 tables
- From: "Ian Chappel" <newsATian-chappel.com>
- Date: Thu, 15 Sep 2005 23:43:17 +0100
If you're not up to speed on SQL, I would suggest creating the individual
halves of the query in the Design Grid, and then copying the text from the
SQL view of each and pasting either side of the "UNION" operator. Make sure
you don't leave a semi-colon within the expression (Access usually creates
it at the end of the SQL statement). Also, only put one ORDER BY statement
at the end of the whole string, if it's required.
"Roger Carlson" <NO-Rog3erc-SPAM@xxxxxxxxxxx> wrote in message
news:ODh5olguFHA.3864@xxxxxxxxxxxxxxxxxxxxxxx
> It sounds to me like you want to use a UNION query:
>
> SELECT Company, Product, Reference, Price
> FROM Table1
> UNION
> SELECT Company, Product, Reference, Price
> FROM Table2
>
> There MUST be the same number of fields in the field list.
>
> --
> --Roger Carlson
> Access Database Samples: www.rogersaccesslibrary.com
> Want answers to your Access questions in your Email?
> Free subscription:
> http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
>
> "J. Silva" <JSilva@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:5CB96339-2995-4E82-87BB-3C5276EF04AE@xxxxxxxxxxxxxxxx
>> Hello
>>
>> I'm having some problem to make a query that joins 2 tables.
>>
>> The two tables (by kind of product) have some identical fields and others
>> that are different. the identical fields are: name of the company, the
> kind
>> of product, reference and the price. My aim is make a query that joined
>> in
> an
>> alone one these three fields for afterwards do the respective report,
> with
>> this headline: name of the company, kind of product, reference and price.
> Can
>> you help me?
>>
>
>
.
- Prev by Date: Re: Need help with updating with value from another database
- Next by Date: Queries in Access - Overdue Dates
- Previous by thread: Re: A query that joins 2 tables
- Next by thread: Re: A query that joins 2 tables
- Index(es):
Relevant Pages
|