PostgreSQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesPostgreSQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 17th, 2013, 04:30 PM
susanph12 susanph12 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 1 susanph12 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 40 sec
Reputation 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

Reply With Quote
  #2  
Old February 3rd, 2013, 08:04 PM
stanbridge stanbridge is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Australia
Posts: 7 stanbridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m
Reputation 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/...n-string-values

Any luck?

Reply With Quote
  #3  
Old February 24th, 2013, 01:07 PM
susanph123 susanph123 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 1 susanph123 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 17 sec
Reputation 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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > Import CSV into postgres, comma problem

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap