PostgreSQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old April 17th, 2008, 07:36 AM
madhan madhan is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 29 madhan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 23 m 26 sec
Reputation Power: 0
Importing data into pgsql

dear all,
I am new to pgsql. I have a query that, is there anyway we can import data into the PostgreSQL database from files like .txt or .xls(Ms Excel files) like we do it in MySQL. Any suggestions given will be extremely helpful.

Thanks in advance.

\madhan

Reply With Quote
  #2  
Old April 17th, 2008, 07:50 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,687 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 5 Days 17 h 59 m 31 sec
Reputation Power: 259
Just like you do it in mysql .xls -> csv format and the use COPY instead of LOAD DATA ...

Reply With Quote
  #3  
Old April 17th, 2008, 08:58 AM
madhan madhan is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 29 madhan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 23 m 26 sec
Reputation Power: 0
Quote:
Originally Posted by pabloj
Just like you do it in mysql .xls -> csv format and the use COPY instead of LOAD DATA ...


sorry i just know it is possible to do it in MySQL but i don't know how to do it. No basics how to do it. It will be extremely helpful if you tell me how to do it. Thanx again..

\madhan

Reply With Quote
  #4  
Old April 17th, 2008, 09:43 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,687 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 5 Days 17 h 59 m 31 sec
Reputation Power: 259
Read the manual page I linked, it contains examples too

Reply With Quote
  #5  
Old April 17th, 2008, 11:12 AM
madhan madhan is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 29 madhan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 23 m 26 sec
Reputation Power: 0
Quote:
Originally Posted by pabloj
Read the manual page I linked, it contains examples too


okay thanks again. ;-)

Reply With Quote
  #6  
Old April 17th, 2008, 11:31 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,687 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 5 Days 17 h 59 m 31 sec
Reputation Power: 259
Quote:
Originally Posted by madhan
okay thanks again. ;-)
Actually those examples are "not so nice", I'll try to add a more "real life" one sooner or later

Reply With Quote
  #7  
Old April 29th, 2008, 03:14 AM
edbaset edbaset is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 2 edbaset Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 9 m 47 sec
Reputation Power: 0
Quote:
Originally Posted by madhan
okay thanks again. ;-)


You may try SOASYNC for this. Visit soasync.com

Reply With Quote
  #8  
Old April 29th, 2008, 03:17 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,687 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 5 Days 17 h 59 m 31 sec
Reputation Power: 259
Quote:
Originally Posted by edbaset
You may try SOASYNC for this. Visit soasync.com
Looks like using a gun to kill a midget (or spam) ... in the meantime I've put up an example of using COPY, see here

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > Importing data into pgsql


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway