hekp updating/moving I loaded a flat file into an SQL table and verified the data. Now I want
to move the data from the input table to the real table. I thought to
use a SQL statement like:
update is2.animals t1 join nullid.nalfherd_in t2
on t1.prefix = t2.reg_prefix
and t1.regnum = t2.regisno
set t1.color=t2.color
;
where t1 is the real table and t2 it the input table. I know I can
achieve this in an SQL procedure, but I was looking for an easier (and
probably more efficient) way.
I also think updating a view which joins the tables will work, but that
gets keyboard intensive, especially for me, with only one hand.
The real problem has 8 tables to be updated from 3 input tables with
about 500 columns between them. |