Victoria Reznichenko wrote: > "Soren O'Neill" <[EMAIL PROTECTED]> wrote: >> I keep getting a syntax error, when trying to run this query (perl >> script): >> >> SELECT * FROM temp_hits WHERE url NOT IN SELECT * FROM hits >> >> Ive tried with brackets around the last SELECT statement ... no better >> ... >> > > Subselects are supported in version 4.1. > > If your version of MySQL doesn't support subselects, at the following link > you can find how to rewrite your query: > http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html > > Thank you very much ... the following seems to work for me:'
SELECT temp_hits.* FROM temp_hits LEFT JOIN hits ON temp_hits.url=hits.url WHERE hits.url IS NULL Kind regards Soren -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]