Try this (I do not have 4.0.24 to try....):

delete table1.* from table1, table2 where table1.id = table2.id and
date<oneweek

Ravi.

On 11/13/07, mark addison <[EMAIL PROTECTED]> wrote:
>
> Dario Hernan wrote:
> > Hi all I need to delete some fields from a table but in the where
> > clause I need to put a select command.
> > For instance, delete from table1 where id=(select id from table2 where
> > date<oneweek)
> > Is it possible in mysql 4.0.24??
> >
> > Thanks in advance
> > Dario
> >
> >
> Not until 4.1. What you can do instead is run the select into a temp
> table and then run the delete as a join with that temp table.
>
> mark
> --
>
>
>
>
>
>
> MARK ADDISON
> WEB DEVELOPER
>
> 200 GRAY'S INN ROAD
> LONDON
> WC1X 8XZ
> UNITED KINGDOM
> T +44 (0)20 7430 4678
> F
> E [EMAIL PROTECTED]
> WWW.ITN.CO.UK
>
> P  Please consider the environment. Do you really need to print this
> email?
> Please Note:
>
>
>
> Any views or opinions are solely those of the author and do not
> necessarily represent
> those of Independent Television News Limited unless specifically stated.
> This email and any files attached are confidential and intended solely for
> the use of the individual
> or entity to which they are addressed.
> If you have received this email in error, please notify
> [EMAIL PROTECTED]
>
> Please note that to ensure regulatory compliance and for the protection of
> our clients and business,
> we may monitor and read messages sent to and from our systems.
>
> Thank You.
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>

Reply via email to