N
Nick
I have a query that looks for duplcate "01" for a reqested date. The query
dose alert me to them but if the duplicate scan occurrs on another date I
only see the duplicate scan for that day.
Please review SQL and explain to me how I can get the complete history of
the dup scans.
SELECT DISTINCTROW ALID0001.scans, ScannAction.Scanname, ALID0001.scans,
ALID0001.label_id, ALID0001.date, ALID0001.time, ALID0001.Delete,
ALID0001.route_id, ALID0001.Employee_id, ALID0001.Scanner_id, [Last Name] & "
," & [first name] AS Expr1, AccountAction.AccountAction
FROM AccountAction INNER JOIN (ScannAction INNER JOIN (Employees RIGHT JOIN
ALID0001 ON Employees.ScannerId = ALID0001.Employee_id) ON
ScannAction.ScanActionId = ALID0001.scans) ON AccountAction.AccoutnNo =
ALID0001.Manual
WHERE (((ALID0001.scans) In (SELECT [scans] FROM [ALID0001] As Tmp GROUP BY
[scans],[label_id] HAVING Count(*)>1 And [label_id] = [ALID0001].[label_id])
And (ALID0001.scans)="01") AND ((ALID0001.date)=[enter date]) AND
((ALID0001.Delete)="N") AND (("01")<>"19"))
ORDER BY ALID0001.scans, ALID0001.date DESC;
dose alert me to them but if the duplicate scan occurrs on another date I
only see the duplicate scan for that day.
Please review SQL and explain to me how I can get the complete history of
the dup scans.
SELECT DISTINCTROW ALID0001.scans, ScannAction.Scanname, ALID0001.scans,
ALID0001.label_id, ALID0001.date, ALID0001.time, ALID0001.Delete,
ALID0001.route_id, ALID0001.Employee_id, ALID0001.Scanner_id, [Last Name] & "
," & [first name] AS Expr1, AccountAction.AccountAction
FROM AccountAction INNER JOIN (ScannAction INNER JOIN (Employees RIGHT JOIN
ALID0001 ON Employees.ScannerId = ALID0001.Employee_id) ON
ScannAction.ScanActionId = ALID0001.scans) ON AccountAction.AccoutnNo =
ALID0001.Manual
WHERE (((ALID0001.scans) In (SELECT [scans] FROM [ALID0001] As Tmp GROUP BY
[scans],[label_id] HAVING Count(*)>1 And [label_id] = [ALID0001].[label_id])
And (ALID0001.scans)="01") AND ((ALID0001.date)=[enter date]) AND
((ALID0001.Delete)="N") AND (("01")<>"19"))
ORDER BY ALID0001.scans, ALID0001.date DESC;