[AccessD] Select query to append query problem x posted

Susan Harkins ssharkins at bellsouth.net
Tue Dec 21 21:48:41 CST 2004


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



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list