Would something like: Delete from dbmail_headervalues where id not in(select headervalue_id from dbmail_header);
Get the job done? _______________________________________________ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail