The below code finds duplicate records in a table for a web project. Not sure if its an error but thought I would ask anyway, the below SQL code works in Navicat;
SELECT
ID,
Entered,
Type,
Rep,
trim( upper( Lastname )),
Time_Minutes,
Notes,
Date_Advice,
Own_Time,
Imported,
COUNT( Date_Advice ) AS Entries FROM
database WHERE
IDCode = 101 GROUP BY
Rep, Lastname, Date_Advice HAVING
COUNT( Rep ) > 1
AND COUNT( Lastname ) > 1
AND COUNT( Date_Advice ) > 1
The same code does not work in XOJO, it does not return a recordset, unless the query is changed to rename the āTrimmed Lastname fieldā to something else, like that below;
SELECT
ID,
Entered,
Type,
Rep,
trim(upper( Lastname )) as NameLast,
Time_Minutes,
Notes,
Date_Advice,
Own_Time,
Imported,
COUNT( Date_Advice ) AS Entries FROM
database WHERE IDCode = 101 GROUP BY Rep,
Lastname, Date_Advice HAVING COUNT( Rep ) > 1
AND COUNT( Lastname ) > 1
AND COUNT( Date_Advice ) > 1
Is it just that Navicat is more forgiving, or is there a small bug in the XOJO MySQL plugin?