I'm trying to remove rows from one table where a column matches another column in a seperate table..
I have mysql 3.22.32: DELETE TemporaryUsers_ToMessWith.* FROM TemporaryUsers_ToMessWith, Advantage_Backup WHERE Advantage_Backup.TempAccountNumber = TemporaryUsers_ToMessWith.TempAccountNumber AND TemporaryUsers_ToMessWith.TempAccountNumber <> 0; I tried that and then realized I need mysql 4.0.0 or higher to do that kind of query. I don't want to delete from multiple tables, just one, but I need to match it with the 2nd table there.. so how would I go about writing that query? If I try this: mysql> DELETE FROM TemporaryUsers_ToMessWith WHERE Advantage_Backup.TempAccountNumber = TemporaryUsers_ToMessWith.TempAccountNumber AND TemporaryUsers_ToMessWith.TempAccountNumber <> 0; ERROR 1109: Unknown table 'Advantage_Backup' in where clause It doesn't know about the 2nd table.. Can anyone help? Thanks, Chad --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php