#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    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.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    1
    Rep Power
    0
    Hi, try

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

    using delimeters '|';

    Best regards,
    Igor
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    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.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    300
    Rep Power
    15
    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...
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    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... [/quote]



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

IMN logo majestic logo threadwatch logo seochat tools logo