Jacob, Raymond A Jr wrote:

I ran the following commands:

USE snort;

CREATE TEMPORARY TABLE sidtemp SELECT cid FROM event WHERE timestamp <
'2006-05-01';
...
SELECT count(*) from sidtemp;
 count(*)
 7501376

DELETE FROM data WHERE data.cid = sidtemp.cid;
ERROR 1109 (42S02): Unkown table 'sidtemp' in where clause

SHOW tables;
Does not include sidtemp in the list of tables in the snort database nor
would I expect it to.

Question: What database is the table sidtemp in?

r/Raymond

You have the wrong syntax. You can't mention a table in the WHERE clause that wasn't in the FROM clause. Try

  DELETE data FROM data JOIN sidtemp ON data.cid = sidtemp.cid;

or

  DELETE data FROM data, sidtemp WHERE data.cid = sidtemp.cid;

See the manual for details <http://dev.mysql.com/doc/refman/4.1/en/delete.html>.

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to