Syst has asked for the wisdom of the Perl Monks concerning the following question:
Does this make sense, is there any easy way to do this? Please excuse my lack of english.### Table 1 $sth = $dbh->prepare("select * from master_table_1"); while (@row=$sth->fetchrow) { $query = "insert into back_table_2 (f1,f2,f3) VALUES ('@row[0]','@row[ +1]','@row[2]')" } ### Table 2 ### Table 1 $sth = $dbh->prepare("select * from master_table_2"); while (@row=$sth->fetchrow) { $query = "insert into back_table_2 (abc1,abc2,abc3) VALUES ('@row[0]', +'@row[1]','@row[2]')" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Copy tables from one db to another
by jZed (Prior) on Jan 19, 2005 at 23:31 UTC | |
|
Re: Copy tables from one db to another
by Errto (Vicar) on Jan 19, 2005 at 23:39 UTC | |
|
Re: Copy tables from one db to another
by borisz (Canon) on Jan 19, 2005 at 23:07 UTC | |
|
Re: Copy tables from one db to another
by jplindstrom (Monsignor) on Jan 20, 2005 at 18:04 UTC |