|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How do i move data from a database into another database using perl script.
kindly post some of your ideas regarding to this prob.
i can connect the 2 databases. but i cant move the files into another database. |
|
#2
|
|||
|
|||
|
I think you need to be more explicit about what you are doing. First, I don't understand 'files' in this context. Do you mean records? Second I have to assume these are disimilar databases otherwise export/import would suffice without perl.
The basic technique is pretty straight forward. You read a record from one database then map its fields to the appropriate fields in records of the other database and write/update the new record. The hard work, it seems to me, is the mapping. |
|
#3
|
||||
|
||||
|
I considered replying to this also. The answer could be as simple as "select", then "insert".
Most databases have much more efficient means of uploading large amounts of information though. PostgreSQL has COPY from STDIN; and also dump methods for saving, then uploading a copy of the tables. |
|
#4
|
||||
|
||||
|
listen to vegeta.
If you don't need to automate this or do this on a regular interval, you don't need PERL. Just dump the database into a text file, and import it into the other database. The way you dump and import is database dependent.
__________________
For one to know everything, first one must accept he knows nothing. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > How do i move data from a database into another database using perl script. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|