Hi
I know i must be missing something obvious, but i have been trying to get the following to work. Below is my ideal, but i understand it doesn't work like this. If i add dLastVisited to my distinct statement, no longer will i only return lSamplePointIDs. Can anyone let me know where i am going wrong?
Thanks
John
I know i must be missing something obvious, but i have been trying to get the following to work. Below is my ideal, but i understand it doesn't work like this. If i add dLastVisited to my distinct statement, no longer will i only return lSamplePointIDs. Can anyone let me know where i am going wrong?
SQL:
SELECT Distinct tblPumpPointDownload.lSamplePointID
FROM tblPumpPointDownload
inner join
tblSamplePointDownload ON tblPumpPointDownload.lSamplePointID = tblSamplePointDownload.lSamplePointID
WHERE(tblSamplePointDownload.lSiteID = @lSiteID)
GROUP BY dLastVisited ,lSamplePointID,lpumppointid
order by dLastVisited
Thanks
John