Helpful Information
 
 
Category: PostgreSQL Help
LOAD in delimited files

How the heck do you load in delimited files into a PostgreSQL Table? I have searched a bit in thier documentation and found no answers.

Hi, try

copy into tabl_name from '/home/user/file_ascii.txt'

using delimeters '|';

Best regards,
Igor

Oops...thanks. I just discovered that about 2 minutes before reading your post. Thats what I get for drinking way to much coffee and trying to juggle three projects at once.

Now I have to learna Unix way of taking the delimited file from ACCESS and formating it it for the COPY in PostgreSQL. Should be hard knowing Unix tough.

If you have Access 2000, it has saome pretty nifty wizards you can use to create delimited files. If not, I think that the usual "tab-delimited" would do, and then a small Perl script or something... http://www.devshed.com/Talk/Forums/smile.gif

Yeah I have 97, exported today....going to see if it works ok. I know I need to do a couple of conversions...ie access dumped the date and time 07/07/2000 0:00:00 for instance and I need to get rid of that as well as convert the 0 in the boolean to f.

Seems like everytime I try to do something I end up learning a new language...php, sql, html, javascript and now possibly perl ;-]

Randall

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by dwarf:
If you have Access 2000, it has saome pretty nifty wizards you can use to create delimited files. If not, I think that the usual "tab-delimited" would do, and then a small Perl script or something... http://www.devshed.com/Talk/Forums/smile.gif[/quote]



------------------
OpenBSD: How long do you want your server to stay up this millenium without being compromised?










privacy (GDPR)