sql - Select Query has unexpected multiple records (MS Access) -
i may tired, can't seem figure out happening. have 2 queries. query 1 has 10 fields. query 2 has 5 fields. fields 1 through 3 same in both queries. trying write select query , simple add field 5 query2 query1 result should query1 additional field (query2.field5).
i join first 3 fields both queries , choose select records in query1 , in query2 match. don't know sql, use query designer. expect same number of records have query 1 instead have 3 times or more. can tell me doing wrong. tried reversing joins still seem same records.
thanks in advance.
here query:
the fields in common divisionname
, supplierid = vendorid
, commodityname
.
select [part revenue exposed query p1].divisionname, [part revenue exposed query p1].commodityname, [part revenue exposed query p1].suppliername, [part revenue exposed query p1].partnumber, [part revenue exposed query p1].partdescription, [part revenue exposed query p1].bucode, [part revenue exposed query p1].productline, [vendor risk score query].vendorscore [part revenue exposed query p1] left join [vendor risk score query] on ([part revenue exposed query p1].divisionname = [vendor risk score query].divisionname) , ([part revenue exposed query p1].supplierid = [vendor risk score query].vendorid) , ([part revenue exposed query p1].commodityname = [vendor risk score query].commodityname);
this because there multiple records in [vendor risk score query] matching condition in [part revenue exposed query p1]. i.e. if corresponding 1 record of [part revenue exposed query p1] values:
divisionname ='testdiv', supplierid = 1, commodityname = 'testcommodity'
there can multiple records in [vendor risk score query] values
divisionname ='testdiv', supplierid = 1, commodityname = 'testcommodity'
then return more records number of records in [part revenue exposed query p1]
Comments
Post a Comment