On Sat, 18 Aug 2001, Ram wrote:

> Date: Sat, 18 Aug 2001 06:16:39 -0700 (PDT)
> From: Ram <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Problem with nested delete - help
> 
> Hi,
> 
> I have a problem with nested delete query. I want to
> delete some record from one table based on the select
> result of another query. e.g.
> 
> delete from tab1 where uid in (select uid from tab2
> where today >= 'any_date');
> 
> Will it work?
Not in the database.  You will have to do this at the application level, 
i.e., do one query to get the uid's from tab2 and then issue separate 
deletes for each uid.  Quite fast with prepared statements in perl.

> 
> I tried, but it says that 'syntex error near
> 'select.....' at line 1.
> 
> If anybody know how to do that, ple let me know.
> 
> Thanks in advance.
> 
> Ram
> 
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 

Sincerely,

William Mussatto, Senior Systems Engineer
CyberStrategies, Inc
ph. 909-920-9154 ext. 27


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to