A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Nested SQL? Need easy to understand "How To"



 
 
Thread Tools Display Modes
  #1  
Old July 9th, 2009, 05:14 AM posted to microsoft.public.access.queries
Eddie[_4_]
external usenet poster
 
Posts: 2
Default Nested SQL? Need easy to understand "How To"

In Access, I am currently using two queries to accomplish the following.
1. The first is a summary query.
2. To the output of this first query, I then do a one side join of a fixed
record table where I want every record of this second table returned, along
with any matching record from the first query.

If I run as two consecutive queries, this works fine. But if I try to do
all in one step, I think the summary nature of the first query messes it up
and I do not get all records from table 2.

But I still have a need to do in one step . And I'm thinking a nested SQL
query could maybe handle. But am having trouble finding a good syntax
reference and/or example. I think I just need to insert the SQL from the
first Access query directly into the second, but not sure how to proceed.

Any thoughts or direction to well illustrated example would be greatly
appreciates. Thanks!! Larry A.

  #2  
Old July 9th, 2009, 10:34 AM posted to microsoft.public.access.queries
Allen Browne
external usenet poster
 
Posts: 11,706
Default Nested SQL? Need easy to understand "How To"

Take a look at this article:
http://allenbrowne.com/subquery-01.html

It gives a fairly basic overview of subqueries (a SELECT query inside
another query), with several examples.

--
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.

"Eddie" wrote in message
...
In Access, I am currently using two queries to accomplish the following.
1. The first is a summary query.
2. To the output of this first query, I then do a one side join of a
fixed record table where I want every record of this second table
returned, along with any matching record from the first query.

If I run as two consecutive queries, this works fine. But if I try to do
all in one step, I think the summary nature of the first query messes it
up and I do not get all records from table 2.

But I still have a need to do in one step . And I'm thinking a nested SQL
query could maybe handle. But am having trouble finding a good syntax
reference and/or example. I think I just need to insert the SQL from the
first Access query directly into the second, but not sure how to proceed.

Any thoughts or direction to well illustrated example would be greatly
appreciates. Thanks!! Larry A.


  #3  
Old July 9th, 2009, 11:53 AM posted to microsoft.public.access.queries
Eddie[_4_]
external usenet poster
 
Posts: 2
Default Nested SQL? Need easy to understand "How To"

Allen, I'll give this a look as soon as I get into work this morning. Just
wanted to mention that my favorite on-line radio station is now Mix94.5. I
listen most evenings which is your next day morning rush hour. Today's
technology is amazing, isn't it?

Thanks much. Will advise if I have any further questions. Larry.

"Allen Browne" wrote in message
...
Take a look at this article:
http://allenbrowne.com/subquery-01.html

It gives a fairly basic overview of subqueries (a SELECT query inside
another query), with several examples.

--
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.

"Eddie" wrote in message
...
In Access, I am currently using two queries to accomplish the following.
1. The first is a summary query.
2. To the output of this first query, I then do a one side join of a
fixed record table where I want every record of this second table
returned, along with any matching record from the first query.

If I run as two consecutive queries, this works fine. But if I try to do
all in one step, I think the summary nature of the first query messes it
up and I do not get all records from table 2.

But I still have a need to do in one step . And I'm thinking a nested
SQL query could maybe handle. But am having trouble finding a good
syntax reference and/or example. I think I just need to insert the SQL
from the first Access query directly into the second, but not sure how to
proceed.

Any thoughts or direction to well illustrated example would be greatly
appreciates. Thanks!! Larry A.



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.