Gustav Brock
Gustav at cactus.dk
Thu Dec 23 01:59:46 CST 2004
Hi Susan Forgive me asking - but did you know about this or was it a shot in the dark? I ask because I would have expected the reverse situation - that DISTINCT would result in 3 records, while no DISTINCT would result in 14 records. Also, (Joe?) would using GROUP BY instead of DISTINCT make any difference? That would have been my first thought trying to solve the issue. /gustav >>> ssharkins at bellsouth.net 22-12-2004 04:48:41 >>> Run the SELECT without the DISTINCT keyword and see what you get. Susan H. I have a select query which properly returns 3 records. SELECT DISTINCT JobDoc.DocID, stblEmpJobTitle.EmpID FROM JobDoc INNER JOIN stblEmpJobTitle ON JobDoc.JobTitleID = stblEmpJobTitle.JobTitleID WHERE (((JobDoc.DocID)=[Forms]![JobDocSort]![DocID]) AND ((JobDoc.JobTitleID)=[Forms]![JobDocSort]![JobTitleID])); When I run the same query as an append query it adds 14 records. INSERT INTO TrainDate ( DocID, EmpID ) SELECT DISTINCT JobDoc.DocID, stblEmpJobTitle.EmpID FROM JobDoc INNER JOIN stblEmpJobTitle ON JobDoc.JobTitleID = stblEmpJobTitle.JobTitleID WHERE (((JobDoc.DocID)=[Forms]![JobDocSort]![DocID]) AND ((JobDoc.JobTitleID)=[Forms]![JobDocSort]![JobTitleID])); The extra records do not seem to have any common link. JOE HECHT LOS ANGELES CA jmhla at earthlink.net