Re: Use select within delete

2007-11-14 Thread Ravi Kumar.
Try this (I do not have 4.0.24 to try): delete table1.* from table1, table2 where table1.id = table2.id and dateoneweek 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

Re: Use select within delete

2007-11-14 Thread Dario Hernan
thanks all, I'll do it with a perl script! Dario 2007/11/14, Ravi Kumar. [EMAIL PROTECTED]: Try this (I do not have 4.0.24 to try): delete table1.* from table1, table2 where table1.id = table2.id and dateoneweek Ravi. On 11/13/07, mark addison [EMAIL PROTECTED] wrote: Dario

Use select within delete

2007-11-13 Thread Dario Hernan
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 dateoneweek) Is it possible in mysql 4.0.24?? Thanks in advance Dario -- MySQL General Mailing List For list archives:

Re: Use select within delete

2007-11-13 Thread mark addison
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 dateoneweek) Is it possible in mysql 4.0.24?? Thanks in advance Dario Not until 4.1. What you

Re: SELECT and DELETE

2004-01-30 Thread Egor Egorov
Cummings, Shawn (GNAPs) [EMAIL PROTECTED] wrote: I'd like to kill 2 birds with one stone... I'd like to SELECT a set of records (for viewing) and in the same motion DELETE any that show up. Can it be done? You can't do it with one query. -- For technical support contracts, goto

SELECT and DELETE

2004-01-29 Thread Cummings, Shawn (GNAPs)
I'd like to kill 2 birds with one stone... I'd like to SELECT a set of records (for viewing) and in the same motion DELETE any that show up. Can it be done? Shawn Cummings Engineering Project Manager Global NAPs 10 Merrymount Rd Quincy, MA 02169 Desk 617-507-5150 VoIP 617-507-3550 [EMAIL

RE: select and delete

2003-06-30 Thread Jay Blanchard
[snip] That will only result in deletion,I want it to be displayed and simultaneously deleted.more precisely the effect of following two commands in one SELECT from data where name='harsh'; DELETE from data where name='harsh'; [/snip] Write a .sql script with both queries and call it from the

select and delete

2003-06-28 Thread harsh
Hi, I need to perform a query which deletes the selected results from the table, like SELECT * from data where name='harsh' (here i want something to delete it as well) if its possible with single query... thanks for help..:)

Re: select and delete

2003-06-28 Thread Paul DuBois
At 21:40 +0530 6/28/03, harsh wrote: Hi, I need to perform a query which deletes the selected results from the table, like SELECT * from data where name='harsh' (here i want something to delete it as well) if its possible with single query... thanks for help..:) It sounds as though you really

Re: select and delete

2003-06-28 Thread harsh
thanks for help..:) It sounds as though you really want something more like this: DELETE FROM data WHERE name='harsh'; That will only result in deletion,I want it to be displayed and simultaneously deleted.more precisely the effect of following two commands in one SELECT from data where

Re: select and delete

2003-06-28 Thread Paul DuBois
At 0:42 +0530 6/29/03, harsh wrote: thanks for help..:) It sounds as though you really want something more like this: DELETE FROM data WHERE name='harsh'; That will only result in deletion,I want it to be displayed and simultaneously deleted.more precisely the effect of following two

select then delete everything selected

2002-02-14 Thread Eric Mayers
Hi List, I need to select a set of stuff from the database and then delete exactly the same stuff. I've formed two query statements and I'm tacking modifications to their ends to be consistent, but I'm not sure if with a limit clause the database will delete the same set of contents selected?