4 messages in com.mysql.lists.mysqlRE: Simple error ... Im sure
FromSent OnAttachments
Soren O'Neill19 Aug 2003 14:32 
Allen Weeks19 Aug 2003 15:30 
Victoria Reznichenko20 Aug 2003 01:59 
Soren O'Neill20 Aug 2003 11:36 
Subject:RE: Simple error ... Im sure
From:Allen Weeks (alle@starband.net)
Date:08/19/2003 03:30:40 PM
List:com.mysql.lists.mysql

If you are using a MySQL version allowing subselects, try this:

SELECT * FROM temp_hits WHERE url NOT IN(SELECT * FROM hits)

use parenthesis not brackets

hope it helps

Allen

-----Original Message----- From: news [mailto:ne@sea.gmane.org]On Behalf Of Soren O'Neill Sent: Tuesday, August 19, 2003 2:32 PM To: mys@lists.mysql.com Subject: Simple error ... Im sure

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 ...

(Essentially, the tables hits, new_hits and temp_hits hold the same columns, what I want to do is extract any rows from new_hits, where the url field is not found in the hits table...)