wvandenberg
Technical User
Morning,
I have this query that works correctly.
I was just wondering if anyone had any suggestions on how I could rewrite the SQL to speed up the query. Any advice is appreciated.
Thanks,
Wendy
I have this query that works correctly.
Code:
INSERT INTO tblWizTempALS ( SAMPLENUM, CLIENTID, MATNUM, SMPDATE, PCODE, METHOD, ANALYTE, RESULT, ResultFixed, Symbol, UNITS, QUALIFIER, RComments )
SELECT tblWizTempWDS.SAMPLE_NO, tblWizTempWDS.STATION_NO, tblWizTempWDS.SAMPLE_MATRIX_CODE, tblWizTempWDS.SAMPLE_DATETIME, tblWizTempWDS.VARIABLE_GROUP_NAME, tblWizTempWDS.VARIABLE_CODE, tblWizTempWDS.VARIABLE_NAME, tblWizTempWDS.MEAS, tblWizTempWDS.ResultFixed, tblWizTempWDS.Symbol, tblWizTempWDS.UNIT_CODE, tblWizTempWDS.QC_SAMPLE_FLAG, tblWizTempWDS.MEASUREMENT_ID
FROM tblWizTempWDS LEFT JOIN [SELECT tblResults.Comments
FROM tblSites INNER JOIN (tblSamples INNER JOIN tblResults ON tblSamples.pkSampleID = tblResults.fkSampleID) ON tblSites.pkSiteID = tblSamples.fkSiteID
WHERE (((tblSites.SiteName) Like "AB0" & "*"))]. AS A ON tblWizTempWDS.MEASUREMENT_ID = A.Comments
WHERE (((A.Comments) Is Null));
Thanks,
Wendy