Can't get a left join to work correctly
- From: SP <s.pamurthy@xxxxxxxxx>
- Date: Tue, 13 Nov 2007 15:56:14 -0000
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"));
.
- Follow-Ups:
- Re: Can't get a left join to work correctly
- From: rquintal@xxxxxxxxxxxx
- Re: Can't get a left join to work correctly
- From: Rich P
- Re: Can't get a left join to work correctly
- Prev by Date: Field Validation
- Next by Date: Re: Can't get a left join to work correctly
- Previous by thread: Field Validation
- Next by thread: Re: Can't get a left join to work correctly
- Index(es):
Relevant Pages
|