#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    Import CSV into postgres, comma problem


    Hi,

    I am trying to copy some data from a csv into postgres. I am using the 'copy' syntax, which imports data fine but gives problems on comma. For example: The text in 1 csv cell is like the following: (Note: the following text would be in 1 cell).
    Bird's Head, P. Waar, Philip

    I tried the following (adding slash before comma)
    Bird's Head/, P. Waar/, Philip
    But my result in Data Base has quotes in the cell like following.
    "Bird's Head, P. Waar, Philip"
    I dont want quotes in a cell.

    Can someone please help me get the same format in database table like in csv? which is
    Bird's Head, P. Waar, Philip

    Thanks
    Susan
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Location
    Australia
    Posts
    9
    Rep Power
    0
    I had a similar issue last year. I can't recall exactly what I did but I think it was this post pointed me in the right direction:
    http://stackoverflow.com/questions/1...-string-values

    Any luck?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    4
    Rep Power
    0
    Hi,

    Thanks for the help, this has solved my problem. Sorry for delay in reponse, i forgot my password and no matter how much i tried i could get a new one, so i have created a new account, so i am responding as susanph123, but
    susanph12 and susanph123 is the same person.

    Thanks

IMN logo majestic logo threadwatch logo seochat tools logo