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

--- Comment #54 from Stephan Diestelhorst <stephan.diestelho...@gmail.com> ---
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 watching all bug changes.

Reply via email to