Re: select ... count ... inner join statement



> It would help if we knew all the possible values for statusm but given
> what you've told us, the solution is as easy as:
>
> WHERE Status IN (0,2)
>


Status can be either 0,1 or 2.

I have just added the line you proposed to my SQL query, but the result is
precisely want do NOT want. Your addition adds a filter, thus not creating
lines where c is 0, i.e. no occurences of returned order from a particular
customer. I would like the COUNT property to count the number of instances
where status = 2, and when that count is 0, ALSO express that (by a zero).
With the filter you propose, instances that return zero are ommited.


>
> I hope you find one. I've never seen such a beast. :-)
> Have you tried searching amazon.com?
>
> Bob Barrows

I found this book:

"SQL in Easy Steps", written by Mike McGrath.
Amazon link:
http://www.amazon.co.uk/exec/obidos/ASIN/1840782579/ref=ord_cart_shr/026-8153264-1906838?%5Fencoding=UTF8&m=A3P5ROKL5A1OLE

Any opinions?

Thanks again.

TB


.



Relevant Pages

  • Re: In VBA how do I link the fields of a form to an on-the-fly SQL
    ... Filter and FilterOn properties. ... Assuming that the Constellation, StarName, ... Now I create a SQL query for just those stars in Orion. ... Dim db as Database, rst as Recordset, strSQL as String ...
    (microsoft.public.access.queries)
  • Re: A very basic search form in access
    ... > gets inserted into a sql query and the results of the query gets ... From the PopUp menu I click on "Filter By Form" ... In the Payee TextBox I enter "Like Sh*" without the quotation marks. ... From the PopUp menu I click "Apply Filter/Sort". ...
    (comp.databases.ms-access)
  • Re: Query Question
    ... If i'm trying to filter by Date and Time which is 2 seperate data field ... how's the sql query be like? ... Thks! ... "Hari Prasad" wrote: ...
    (microsoft.public.sqlserver.mseq)
  • RE: Applying Filter
    ... If you want to apply the filter to DB query, sql query is like ... If you get whole data into a datatable then apply the filter, ... > tried the Data Form Wizard in Visual Studio, ... > Catch eLoadMerge As System.Exception ...
    (microsoft.public.dotnet.framework.adonet)