Dear All,
Using MySQL I'm trying to update field1 in table1 with data from field1 in table2
where the primary keys in tables 1 and 2 match. In other words I have 2 tables the
first with direction information and the second with speed information both have time
as the primary key and what I want is a single TEMPORARY table with the direction and
speed indexed by time. Table 1 is a copy of the speed information with an extra field
to accommodate the direction information.
So far I've tried
$query = qq{SELECT f_dir.t_table1, f_speed.t_table2 WHERE f_time.t_table1 =
f_time.t_table2};
while my $hasharray = ....
{
$query = qq{UPDATE...
}
which is very slow (the tables contain 20 000 records).
Another option would be to select the data into a text file, delete existing data from
the table1 and bulk load the text file into the table, which seems extremely clumsy.
Is there an option I've missed?
Ta,
Scott