PC Review


Reply
Thread Tools Rate Thread

Creating a table from 2 different queries

 
 
Jaz
Guest
Posts: n/a
 
      29th Mar 2007
I have 2 queries that provide the following information:

Query 1
Vendor ID
Ship Qty

Query 2
Vendor ID
RejectQty

Is there a way to run these 2 queries and make 1 table with the following
information?

Vendor ID Ship Qty Reject Qty


Thanks,
Jasper


 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      29th Mar 2007
Sure. Create a 3rd query that joins them together (as though they were
tables), and use that query.

The SQL would look something like:

SELECT Query1.VendorID, Query1.ShipQty, Query2.RejectQty
FROM Query1 INNER JOIN Query2
ON Query1.VendorID = Query2.VendorID

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Jaz" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have 2 queries that provide the following information:
>
> Query 1
> Vendor ID
> Ship Qty
>
> Query 2
> Vendor ID
> RejectQty
>
> Is there a way to run these 2 queries and make 1 table with the following
> information?
>
> Vendor ID Ship Qty Reject Qty
>
>
> Thanks,
> Jasper
>
>



 
Reply With Quote
 
Jaz
Guest
Posts: n/a
 
      30th Mar 2007
Perfect!

One more question: If this 3rd query uses the other queries to run, does it
actually run the 2 queries first?

So if I make a change on any of the first 2 queries, will it affect the 3rd
query?

Thanks,
Jasper



"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:(E-Mail Removed)...
> Sure. Create a 3rd query that joins them together (as though they were
> tables), and use that query.
>
> The SQL would look something like:
>
> SELECT Query1.VendorID, Query1.ShipQty, Query2.RejectQty
> FROM Query1 INNER JOIN Query2
> ON Query1.VendorID = Query2.VendorID
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Jaz" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I have 2 queries that provide the following information:
> >
> > Query 1
> > Vendor ID
> > Ship Qty
> >
> > Query 2
> > Vendor ID
> > RejectQty
> >
> > Is there a way to run these 2 queries and make 1 table with the

following
> > information?
> >
> > Vendor ID Ship Qty Reject Qty
> >
> >
> > Thanks,
> > Jasper
> >
> >

>
>



 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      30th Mar 2007
Yes, if you make changes to either of the first 2 queries, those changes
will apply to the 3rd query as well.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Jaz" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Perfect!
>
> One more question: If this 3rd query uses the other queries to run, does
> it
> actually run the 2 queries first?
>
> So if I make a change on any of the first 2 queries, will it affect the
> 3rd
> query?
>
> Thanks,
> Jasper
>
>
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
> news:(E-Mail Removed)...
>> Sure. Create a 3rd query that joins them together (as though they were
>> tables), and use that query.
>>
>> The SQL would look something like:
>>
>> SELECT Query1.VendorID, Query1.ShipQty, Query2.RejectQty
>> FROM Query1 INNER JOIN Query2
>> ON Query1.VendorID = Query2.VendorID
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no private e-mails, please)
>>
>>
>> "Jaz" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >I have 2 queries that provide the following information:
>> >
>> > Query 1
>> > Vendor ID
>> > Ship Qty
>> >
>> > Query 2
>> > Vendor ID
>> > RejectQty
>> >
>> > Is there a way to run these 2 queries and make 1 table with the

> following
>> > information?
>> >
>> > Vendor ID Ship Qty Reject Qty
>> >
>> >
>> > Thanks,
>> > Jasper
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a table using queries? =?Utf-8?B?dGZsZXR0?= Microsoft Access 2 25th Jul 2007 05:33 PM
Creating a table from series of Crosstab queries =?Utf-8?B?U2VhbiBNLg==?= Microsoft Access Queries 3 18th Apr 2007 02:46 PM
Creating table and queries =?Utf-8?B?UmVk?= Microsoft Access Queries 1 26th May 2005 08:49 PM
Creating an X-Ref of table usage in forms, queries, reports =?Utf-8?B?R2VuZTUz?= Microsoft Access 3 23rd Feb 2005 05:37 PM
Refreshing Make Table Queries and Append Queries =?Utf-8?B?SmltbXkgRw==?= Microsoft Access 3 4th Feb 2005 04:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:43 PM.