MySQL Forums
Forum List  »  Microsoft Access

Re: Who Can Help Me Convert This Working Access SQL to MySQL?
Posted by: Devart Team
Date: August 31, 2011 12:09AM

Try this variant -

DELETE ibf_message_text
FROM
  ibf_message_text
WHERE
  ibf_message_text.msg_id IN
  (SELECT ibf_message_text.msg_id
   FROM
     ibf_message_text
   LEFT JOIN ibf_members
   ON ibf_message_text.msg_author_id = ibf_members.id
   WHERE
     ibf_members.id IS NULL) t;

And have a look at these queries -

SELECT txt.msg_id, txt.msg_post, txt.msg_author_id FROM ibf_message_text txt
LEFT JOIN ibf_members mem
  ON txt.msg_author_id = mem.id
WHERE
  mem.id IS NULL;

DELETE txt
FROM
  ibf_message_text txt
LEFT JOIN ibf_members mem
ON txt.msg_author_id = mem.id
WHERE
  mem.id IS NULL;

Devart Company,
MySQL management tools
http://www.devart.com/dbforge/mysql/

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Who Can Help Me Convert This Working Access SQL to MySQL?
3307
August 31, 2011 12:09AM
2684
February 24, 2012 02:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.