Re: Dups

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dan _at_BCBS (_at_BCBS)
Date: 01/28/05


Date: Fri, 28 Jan 2005 09:51:03 -0800

The GROUP BY is fine with only one query, but I need all 4 queries..
Example: Query 1 has 44, Query 2 has 11, when I put them on the same Query I
get a total of 484... (44x11)..

Here is my situation:
I have 4 question (4 queries) that I asked Providers, some providers failed
1, 2,3 or all 4 questions.... I need to know how many providers failed
(could be failed 1, 2,3 or all 4 don't matter)...

It's easy to count how many questions were failed, but I need to know haw
many Providers failed..

So, I assumed I should put the 4 queries on one query and somehow merge and
identify the DISTINCT Providers...

Suggestions Please..

 

"[MVP] S.Clark" wrote:

> It seems odd that you're using 4 queries to do this, so maybe if you explain
> more about the nature of the table structures and the queries, we can give a
> more definate answer.
>
> Typically, using GROUP BY will assist with gathering unique values.
>
> e.g. Select Count(Providerid), ProviderCategory From tblStuff GROUP BY
> ProviderCategory
>
> --
> Steve Clark, Access MVP
> FMS, Inc.
> www.fmsinc.com/consulting
>
> "Dan @BCBS" <DanBCBS@discussions.microsoft.com> wrote in message
> news:3BAA149A-3523-46D1-91BD-077817EEB320@microsoft.com...
> > With a new query created from 4 other queries, I just want a count with no
> > duplicates.
> >
> > Example: 4 queries all have a field called ProviderNo. the first query
> > has
> > 24 the second has 3 and so on...
> >
> > All I want to do is count the Distinct ProviderNO.
> >
> > I made a new query with all 4 queries and added DISTINCT to the SQL but
> > that
> > did not work..
> >
> > Help
>
>
>



Relevant Pages

  • Re: Dups
    ... You are looking for a UNION query. ... UNION queries cannot be created in the query grid, ... > identify the DISTINCT Providers... ...
    (microsoft.public.access.queries)
  • Re: Get the first x records
    ... in my program I want to limit the number of fetched records in ... queries containing select statement. ... MaxRecord doesn't works for all ... the providers. ...
    (borland.public.delphi.database.ado)
  • Get the first x records
    ... in my program I want to limit the number of fetched records in queries containing select statement. ... MaxRecord doesn't works for all the providers. ...
    (borland.public.delphi.database.ado)
  • Re: Get the first x records
    ... in my program I want to limit the number of fetched records in ... queries containing select statement. ... MaxRecord doesn't works for all ... It does not work for all providers as well eg oracle. ...
    (borland.public.delphi.database.ado)
  • RE: Dynamically referencing a recordset?
    ... through that recordset to set the query parameters in VBA. ... to be the one who had to modify 1440 queries if there is a change in the ... different table schema, then you need 3, one for each record type. ... This is a database that tracks the production on records in another ...
    (microsoft.public.access.modulesdaovba)