[plug] SQL help

simon simon at chrome64.org
Tue Dec 13 16:17:21 WST 2005


sure! there's always a way to do everything.....

select 'update table1 set field1 = ' || t2.field1 || ' where pk = ' || t1.pk
|| ';'
from table1 t1, table2 t2
where t2.pk = t1.pk
and t1.field1 is null;

or something like that :) Run it, grab the script it produces, and run it :)

The syntax might be wrong - been ages since I used MySQL.



Benjamin Woods (woodsb02 at iinet.net.au) wrote:
>
> I have just spoken to some people on irc and they say that mysql 3.23 cannot
> do multitable updates. they recommended upgrading the mysql server to 4.0.X
> after testing and backing up server.
>
> I am wondering, is there a way to do this without multitable requests?
>
> Thanks
>
> From: Benjamin Woods
> woodsb02 at iinet.net.au
> Registered Linux User #372573
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://www.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au
>

--
=================
Simon Scott
simon at chrome64.org
mob: 0409113359
=================






More information about the plug mailing list