|
Re: Major Problem!!!
|
Posted: Oct 7, 2005 3:08 PM
|
|
Hi Pranjal,
I hope you might know about .csv files which are infact comma (,) or pipe (|) seperated files.
So the solution goes here just convert you .mdb data in .csv files , you can do that by exporting it to excel and then saving it as .csv or there might be many other ways.
Now you can , write code to access records from those .csv file coz they are also accessible in linux environment.
Hope fully if you are not that comfortable with java and if you are using postgres that comes along with linux distribution then theres a easy way out , PostgreSQL's "COPY" statement is an excellent way to load large amounts of data quickly into a database.
COPY will be run by the PostgreSQL you need to have permissions to read & write to the data file in order to copy from/to it, and needs to be able to find it.
Therefore you need to use an absolute pathname. You will also need to have insert/update or select permission on the table in order to COPY to or from it.
Assuming these requirements are met, you are ready to happily populate your database by doing:
example run following at your prompt: COPY employees TO '/tmp/employee_data.csv' USING DELIMITERS '|';
OR
COPY employees TO '/tmp/employee_data.csv' USING DELIMITERS ',';
I hope this may solve your problem without taking the trouble of writing java codes and all.
Best of Luck Sharad Thakur
|
|