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
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
> 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
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