Can't get a left join to work correctly



I have two tables, A & B. Table B has adjustment factors of three
types, "COMM" being one of them. I want a query that generates all
rows of table A, and those where certain fields match, I want the
value of A.PD01 to be multiplied by the the "COMM" factor.

I have the following SQL, but it only generates the records where the
fields match, not all of them.

SELECT A.DV, A.AR, A.BU, A.MCLASS, A.CLASS, [B]![PD01]*[A]![PD01] AS
PD01
FROM A LEFT JOIN B ON (A.AR = [B].AR) AND (A.DV = [B].DV) AND (A.BU =
[B].BU) AND (A.MCLASS = [B].MCL)
WHERE (([B]![NAME]="COMM"));

.



Relevant Pages

  • Re: Cant get a left join to work correctly
    ... I want a query that generates all ... rows of table A, and those where certain fields match, I want the ... value of A.PD01 to be multiplied by the the "COMM" factor. ... clause in the left join query. ...
    (comp.databases.ms-access)
  • Re: Access Query - Dont know what type to use - Inner Join? Updat
    ... I just created a Query using the following syntax: ... INNER JOIN Projects ... I create a "new" query using the SQL view, ... Name field to the Comm Name field in the Issues Table? ...
    (microsoft.public.access.queries)
  • Re: Access Query - Dont know what type to use - Inner Join? Updat
    ... UPDATE Issues INNER JOIN Projects ON Issues.= ... I create a "new" query using the SQL view, ... Name field to the Comm Name field in the Issues Table? ... I would like to do the following: (basically populate the field from one ...
    (microsoft.public.access.queries)
  • Re: Access Query - Dont know what type to use - Inner Join? Updat
    ... I create a "new" query using the SQL view, ... Name field to the Comm Name field in the Issues Table? ... I would like to do the following: (basically populate the field from one ... table based on control / or field from another table). ...
    (microsoft.public.access.queries)
  • Re: LIKE in SQL and substring
    ... So if the company name ends in " comm" you don't want the record? ... Access MVP 2002-2005, 2007-2008 ... Exxonmobil comm ... It seems to me that the query syntax is doing what it should, ...
    (microsoft.public.access.modulesdaovba)