just a suggestion: re-type the query making sure you have no spurious characters in the text and no extra whitespace at the end of the lines (which sometimes happens when you cut & paste) because when i run the query from your post against my dbms from the sql commandline, I don't get any sql errors:
[SQL] SELECT bad_rows. * FROM post AS bad_rows
INNER JOIN (
SELECT threadid, dateline, username, userid, MIN( postid ) AS min_postid FROM post
GROUP BY threadid, dateline, userid
HAVING count( * ) >1
) AS good_rows ON good_rows.threadid = bad_rows.threadid
AND good_rows.dateline = bad_rows.dateline
AND good_rows.userid = bad_rows.userid
AND good_rows.min_postid <> bad_rows.postid
Affected rows: 0
Time: 0.098ms
not saying the sql is correct for the task you want to accomplish, just that it's not throwing errors for me.
|