Hi there, I am currently facing the following problem and hope someone can help me.
I want to make an INSERT into a Table only if I haven't done this before. This is because the INSERT can be done by several Programs and the record should only be inserted once. I have found the following solutions (but none of them was satisfying): 1. First do a SELECT and the make an INSERT if necessary. 2. Doing the following works fine with MS SQL and Oracle but not with mySQL: insert into myTable (myCol) select distinct '8888' from myTable where '8888' not in (select myCol from myTable ); The error I get is "ERROR 1066: Not unique table/alias: 'af_events'" That's it. Hope someone can help me. Thanks in advance marc --------------------------------------------------------------------- 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