https://bugs.kde.org/show_bug.cgi?id=338658

--- Comment #54 from Stephan Diestelhorst <[email protected]> ---
For me mysql complained about "You can't specify target for update in FROM
clause".  Wrapping things into another layer of SELECT did the trick:

DELETE FROM pimitemtable WHERE pimitemtable.id in (
  SELECT id FROM (
    SELECT id FROM pimitemtable
    LEFT OUTER JOIN (
      SELECT MIN(pimitemtable.id) as RowId, pimitemtable.remoteId,
pimitemtable.collectionId FROM pimitemtable GROUP by pimitemtable.remoteId,
pimitemtable.collectionId )
    as KeepRows ON pimitemtable.id = KeepRows.RowId
    WHERE KeepRows.RowId IS NULL)
  AS foo)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Kdepim-bugs mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kdepim-bugs

Reply via email to