I am trying to find duplicate customer's name, but my code show an error when i let it run. please help.
The column that i use are these: customer (text), Field13(text field) show date when the customer submit questions, Survey Type, Svc Acct Num. I am trying to write a code that can help me look for duplicate customer. The criteria is that 1) the customer can't submit questions within 12 months (Field 13), 2) Survey type cannot be duplicated, 3) svc Acct numb can't be duplicate.
My code is as follow:
SELECT t1.* FROM Surveytest2007 as T1
INNER JOIN Surveytest2007 as T2
ON T2.Customer=T1.Customer
AND T2.Survey Type = T1.Survey Type
AND T2.ID <> T1.ID
WHERE Abs(DateDiff("m", Cdate(T1.Field13), CDate(T2.Field13))) <= 12
The problem is that i will receive Syntax error(missing operator) in query expression
The column that i use are these: customer (text), Field13(text field) show date when the customer submit questions, Survey Type, Svc Acct Num. I am trying to write a code that can help me look for duplicate customer. The criteria is that 1) the customer can't submit questions within 12 months (Field 13), 2) Survey type cannot be duplicated, 3) svc Acct numb can't be duplicate.
My code is as follow:
SELECT t1.* FROM Surveytest2007 as T1
INNER JOIN Surveytest2007 as T2
ON T2.Customer=T1.Customer
AND T2.Survey Type = T1.Survey Type
AND T2.ID <> T1.ID
WHERE Abs(DateDiff("m", Cdate(T1.Field13), CDate(T2.Field13))) <= 12
The problem is that i will receive Syntax error(missing operator) in query expression