RE: subquery help for an update

2005-02-16 Thread mel list_php
Found some help here: http://forums.mysql.com/read.php?10,10572,11064#msg-11064 UPDATE Table1 SET Table1.Field1 = ( SELECT count(*) FROM Table2 WHERE Table2.Code2=Table1.Code1 ) and that query works for me, great!! But I still don't understand why it updates properly without the WHERE clause. So i

Re: Subquery help...

2004-06-06 Thread Josh Trutwin
On Sat, 5 Jun 2004 21:10:42 -0600 "Daniel Isenhower" <[EMAIL PROTECTED]> wrote: > > First off, I assume you are using a version of mysql able to > > handle > sub-queries. 4.1 or 5.0 (4.0.xx does NOT support sub-queries) > > Ugh... I feel dumb :) I'm using 4.0 No worries, there are too many

Re: Subquery help...

2004-06-05 Thread Daniel Isenhower
> First off, I assume you are using a version of mysql able to handle sub-queries. 4.1 or 5.0 (4.0.xx does NOT support sub-queries) Ugh... I feel dumb :) I'm using 4.0 > FWIW, this is an easy query with a JOIN: > > SELECT id FROM work w > INNER JOIN client_list cl ON cl.id = w.client_id > WH

Re: Subquery help...

2004-06-05 Thread Josh Trutwin
On Sat, 5 Jun 2004 19:48:44 -0600 "Daniel Isenhower" <[EMAIL PROTECTED]> wrote: > This is my first email to the list, so be nice ;-) Welcome, this is a very helpful list... > I'm having some difficulty with a subquery that I'm trying to do, > and was wondering if anyone here can shed some light