RE: How to combine two queries into one?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Dale,
First I’d like to thank for your patient explanation. I have some further
questions to ask ,hope you can rely with the same patience,thanks.
1. For each person there are several records in the table 1, but for every
table1.name its table1.city is unique, in fact table1.salary refers to
account balance. So the primary key in table1 is account no., but is ignored
in both two queries. I group both by name and city ,because the field city is
going to be inner joined with table2.city and also because whether to be
grouped by either name or by two fields name and city duo to the exclusive
relation between name and city, the results are same, except the latter will
add a city field beside field name.
2. Before seeing your sql proposed, I never thought of to use “union”
function, thank you again to give me a new way of thinking. And I’v tried in
the sql view platform to put in your sql, it appeared not as I wanted,
because after running the query, it turned out with records not with unique
province, as I explained as above I supposed the results turned out with the
lists of provinces (ignoring grouped by city) and the total account balance
within the city.
3. because I am not familiar with the meaning of First("") as City, I
first omitted in the sql view platform, but while running it returned with
error, as long as I put the sentence in ,it runs well, can you explain the
sentence for me ,if it need explain the whole union query written in sql?
4.I am absolutely sorry as to beg you to write another query for me in sql,
according to the information above.
Many thanks.
Dawn
.



Relevant Pages

  • Re: Cant run a query - can anyone help?!
    ... be invited to which contains the city, venue name, date and times they ... You'll have to post the Where clause of your query SQL. ... If the value in the [Suggested Training Venue] field is one of those ...
    (microsoft.public.access.queries)
  • Re: Cant run a query - can anyone help?!
    ... fredg wrote: ... be invited to which contains the city, venue name, date and times they ... You'll have to post the Where clause of your query SQL. ...
    (microsoft.public.access.queries)
  • Re: Cant run a query - can anyone help?!
    ... fredg wrote: ... be invited to which contains the city, venue name, date and times they ... You'll have to post the Where clause of your query SQL. ...
    (microsoft.public.access.queries)
  • Re: Cant run a query - can anyone help?!
    ... fredg wrote: ... be invited to which contains the city, venue name, date and times they ... You'll have to post the Where clause of your query SQL. ...
    (microsoft.public.access.queries)
  • Re: Still Didnt Work
    ... Is the column in the table called [Account Number]. ... not change the SQL to the true column name. ... >a Combo Box that presents options from a query that was ... >>Contact 1 City ...
    (microsoft.public.access.forms)