sql - MS Access 2010 query returns more rows than in table -
i have query in ms access 2010 returns more rows there in source table.
i have tried recreate happening simplified example, not same effect. have set parameters records in source table should included, match other tables.
the tbl_toyota2012
has 178'205 records... result of query returns 180'365 records.
here sql code:
select tbl_toyota2012.[fc-teile-nr], tbl_toyota2012.bezeichnung, tbl_toyota2012.pfc, tbl_toyota2012.pc, tbl_toyota2012.warengruppe, tbl_pricecodes.price_code, tbl_pricecodes.normal_factor, tbl_toyota2012.ek_netto_mandant ep, tbl_toyota2012.upe, tbl_toyota2012.rabattsatz, tbl_nwgw_key.zuteilung, tbl_toyota2012.umsatz_2012_units [volumen 2012], [tbl_toyota2012]![umsatz_2012_units]*[tbl_toyota2012]![upe]*(1-([tbl_toyota2012]![rabattsatz]/100)) nettoumsatz (tbl_toyota2012 left bring together tbl_nwgw_key on (tbl_toyota2012.pc = tbl_nwgw_key.prodcode) , (tbl_toyota2012.pfc = tbl_nwgw_key.pfc)) left bring together tbl_pricecodes on (tbl_toyota2012.modell_id = tbl_pricecodes.model_id) , (tbl_toyota2012.pc = tbl_pricecodes.prod_code) , (tbl_toyota2012.pfc = tbl_pricecodes.prod_func_code);
can tell me why might happen?
this happen if there more 1:1 relationship between tbl_toyota2012 , 2 tables joining on (pricecodes , tbl_nwgw_key) there more rows.
i.e. if each entry in tbl_toyota2012 there several entries in pricecodes or tbl_nwgw_key.
to reply comments:
if have table 'parent' joins table 'children' parent 2 children homecoming more 1 line.
select parent.name, child.name parent inner bring together kid on parent.id = childid
this might return:
[parent name], [child name]
bob, susan
bob, david
sql ms-access-2010
No comments:
Post a Comment