[AccessD] Query gives duplicate records

Kaup, Chester Chester_Kaup at kindermorgan.com
Thu Jul 17 16:07:43 CDT 2008


This query asks for a value for [tbl Wells on SCADA]![Wellname].

INSERT INTO [tbl Wells on SCADA] ( Wellname )
SELECT DISTINCT [qry Water Injectors on SCADA].Wellname
FROM [qry Water Injectors on SCADA]
WHERE ((([qry Water Injectors on SCADA].Wellname)<>[tbl Wells on SCADA]![Wellname]));

If I modify the query like this I don't get asked for [tbl Wells on SCADA]![Wellname] but I get duplicate records.


INSERT INTO [tbl Wells on SCADA] ( Wellname )

SELECT DISTINCT [qry Water Injectors on SCADA].Wellname

FROM [qry Water Injectors on SCADA], [tbl Wells on SCADA]

WHERE ((([qry Water Injectors on SCADA].Wellname)<>[tbl Wells on SCADA]![Wellname]));

What am I doing wrong here. Thanks.



Chester Kaup

Engineering Technician

Kinder Morgan CO2 Company, LLP

Office (432) 688-3797

FAX (432) 688-3799





No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.




More information about the AccessD mailing list