nt_id=t_parent.task_id
WHERE t_parent.task_id IS NULL
-Original Message-
From: Sergei Golubchik [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 3:52 PM
To: Moshe Gurvich
Cc: [EMAIL PROTECTED]
Subject: Re: how to sub-select?..
Hi!
On Oct 22, Moshe Gurvich wrote:
> yeah, noticed
Hi!
On Oct 22, Moshe Gurvich wrote:
> yeah, noticed it after clicked send..
>
> let's say i upgrade to MySQL 4.0 and run this query:
>
> DELETE FROM tasks as t_child LEFT JOIN tasks as t_parent ON
> t_child.parent_id=t_parent.task_id
> WHERE t_parent.task_id IS NULL
>
>
> will this work?
no.
le in JOIN structure?
-Original Message-
From: Sergei Golubchik [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 3:01 PM
To: Moshe Gurvich
Cc: [EMAIL PROTECTED]
Subject: Re: how to sub-select?..
Hi!
On Oct 22, Moshe Gurvich wrote:
> thank you very much;
>
> i'm us
Hi!
On Oct 22, Moshe Gurvich wrote:
> thank you very much;
>
> i'm using right now v3.23 as recommended for production servers, but
> anyway..
>
> now, using the way you suggested, will this work:
>
> DELETE FROM tasks
> FROM tasks as t_child LEFT JOIN tasks as t_parent ON
> t_child.parent_id=
thanx :)
-Original Message-
From: Sergei Golubchik [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 1:57 PM
To: Moshe Gurvich
Cc: [EMAIL PROTECTED]
Subject: Re: how to sub-select?..
Hi!
On Oct 22, Moshe Gurvich wrote:
> so what's the remedy?
> how to do this task in MyS
Hi!
On Oct 22, Moshe Gurvich wrote:
> so what's the remedy?
> how to do this task in MySQL without using subselects?
>
> > delete from followups where task_id not in (select task_id from tasks)
> >
Multi-table deletes (MySQL 4.0.0+)
DELETE followups FROM followups LEFT JOIN tasks USING(task_id
Trond Eivind Glomsrød wrote:
> "Moshe Gurvich" <[EMAIL PROTECTED]> writes:
>
> > I'm trying to run:
> >
> > delete from followups where task_id not in (select task_id from tasks)
> >
> > but it gives me an error:
> > Error: 1064 - You have an error in your SQL syntax near 'select task_id from
> >
so what's the remedy?
how to do this task in MySQL without using subselects?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Trond Eivind Glomsrød
Sent: Monday, October 22, 2001 1:13 PM
To: Moshe Gurvich
Cc: [EMAIL PROTECTED]
Subject: Re: how t
"Moshe Gurvich" <[EMAIL PROTECTED]> writes:
> I'm trying to run:
>
> delete from followups where task_id not in (select task_id from tasks)
>
> but it gives me an error:
> Error: 1064 - You have an error in your SQL syntax near 'select task_id from
> tasks)' at line 1
>
> where's the problem a
I'm trying to run:
delete from followups where task_id not in (select task_id from tasks)
but it gives me an error:
Error: 1064 - You have an error in your SQL syntax near 'select task_id from
tasks)' at line 1
where's the problem and how to work around?
thank you
---
Outgoing mail is certifie
10 matches
Mail list logo