Default value return

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



I have a query that counts my trailers loaded in a given day for a given
warehouse. I have the data broken down by types (ie, export, truck, can) and
in a particular order.

The problem is: I need the query to return a default value of 0 for each
possiblity when there is no trailers of a particular type loaded in the given
day. (SQL below)
ie: if there were 3 non export, no export trucks and 2 export cans I need an
output of:

Non export: 3
Export Trucks: 0
Export Cans: 2

Thanks,
Dragon

SQL:
SELECT [PCS / Bulk Ship].Warehouse, [PCS / Bulk Ship].ShipDate, [PCS / Bulk
Ship].Export, [PCS / Bulk Ship].Can, Count([PCS / Bulk Ship].[Unit #]) AS
[CountOfUnit #]
FROM [PCS / Bulk Ship]
WHERE ((([PCS / Bulk Ship].[Unit #])>"0.1") AND (([PCS / Bulk Ship].Rail)=0))
GROUP BY [PCS / Bulk Ship].Warehouse, [PCS / Bulk Ship].ShipDate, [PCS /
Bulk Ship].Export, [PCS / Bulk Ship].Can
HAVING ((([PCS / Bulk Ship].Warehouse)='Bulk') AND (([PCS / Bulk
Ship].ShipDate)=[What is the date]))
ORDER BY [PCS / Bulk Ship].Export DESC , [PCS / Bulk Ship].Can DESC;
.



Relevant Pages

  • Re: Default value return
    ... I need the query to return a default value of 0 for each ... Export Trucks: 0 ... Export Cans: 2 ... Use Nzto convert the nulls to zeroes. ...
    (microsoft.public.access.queries)
  • Re: Default value return
    ... Export Trucks and Export Cans? ... I need the query to return a default value of 0 for each ... Use Nzto convert the nulls to zeroes. ...
    (microsoft.public.access.queries)
  • Re: Default value return
    ... records for rail included in these results. ... I need the query to return a value of zero for time frames when there aren’t ... Export Trucks and Export Cans? ...
    (microsoft.public.access.queries)
  • Re: Default value return
    ... I need the query to return a default value of 0 for each ... Export Trucks: 0 ... Export Cans: 2 ... Use Nzto convert the nulls to zeroes. ...
    (microsoft.public.access.queries)
  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)