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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|