Обсуждение: Import (.CVS File) to postgreSql

Поиск
Список
Период
Сортировка

Import (.CVS File) to postgreSql

От
"Premila Devi"
Дата:
<div class="Section1"><p class="MsoNormal"><span style="font-size:8.0pt">Dear All,</span><p class="MsoNormal"><span
style="font-size:8.0pt"> </span><pclass="MsoNormal"><span style="font-size:8.0pt">I like to import (.CVS File) to
postgreSql.Couldanyone help me. May I know, what the requirement.</span><p class="MsoNormal"><span
style="font-size:8.0pt"> </span><pclass="MsoNormal"><span style="font-size:8.0pt">Herewith I attach an Example of CVS
File,Plesetell me how to restore in Postgresql.</span><p class="MsoNormal"><span style="font-size:8.0pt"> </span><p
class="MsoNormal"><spanstyle="font-size:8.0pt">Thank you.</span><p class="MsoNormal"> <p class="MsoNormal"><a
href="http://www.agbnielsen.com/"><spanstyle="font-size: 
12.0pt;font-family:"Times New Roman","serif";color:blue;text-decoration:none"><img
alt="http://cs.agbnmr.com/ci/autocomposition/logo_agb.jpg"border="0" height="77" id="_x0000_i1025"
src="cid:image001.jpg@01CA1A7A.02E56200"width="120" /></span></a><span style="font-size:12.0pt;font-family:"Times New
Roman","serif""></span><pclass="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:10.0pt;font-family:DFKai-SB">WarmestRegards,</span><span style="font-size:12.0pt;font-family:"Times
NewRoman","serif""></span><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:10.0pt;font-family:DFKai-SB">PremilaDevi Dayalan Ramasamy <br /></span><span
style="font-size:10.0pt;font-family:DFKai-SB">ProgrammerAnalyst </span><span
style="font-size:10.0pt;font-family:DFKai-SB"><br/></span><span style="font-size:10.0pt;font-family:DFKai-SB">MSAP
ProductionDevelopment </span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""></span><p
class="MsoNormal"style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:10.0pt;font-family:DFKai-SB">AGBNielsen Media Research<br /> Level 7,Block B,Menara PKNS-PJ,Jalan Yong
ShookLin , 46050 Petaling Jaya , Selangor <br /> ( Malaysia ) </span><span style="font-size:12.0pt;font-family:"Times
NewRoman","serif""></span><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:10.0pt;font-family:DFKai-SB">t:</span><spanstyle="font-size: 
10.0pt;font-family:DFKai-SB"> 603-7620 2320 <br /></span><span
style="font-size:10.0pt;font-family:DFKai-SB">f:</span><spanstyle="font-size:10.0pt;font-family:DFKai-SB"> 603-7620
2316</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""></span><p class="MsoNormal"><span
style="font-size:7.5pt;font-family:DFKai-SB">Pleasenote:</span><span style="font-size:7.5pt;font-family:DFKai-SB"><br
/></span><spanstyle="font-size:7.5pt;font-family:DFKai-SB">This email transmission including its attachments, are
intendedonly for the person or entity to which it is addressed and may contain confidential and/or privileged material.
Anyviews or opinions are solely those of the author and do not necessarily represent those of AGB Nielsen Media
Research,unless specifically stated. Any review, retransmission, dissemination or other use of, or taking of any action
inreliance upon, this information by persons or entities other than the intended recipient is prohibited. If you
receivedthis email in error, please contact the sender and delete the email transmission immediately.</span></div> 

Re: Import (.CVS File) to postgreSql

От
Shoaib Mir
Дата:
On Tue, Aug 11, 2009 at 1:54 PM, Premila Devi <premiladevi.dayalan@agbnielsen.com> wrote:

Dear All,

 

I like to import (.CVS File) to postgreSql.Could anyone help me. May I know, what the requirement.

 


COPY command should be your friend in that case --> http://www.postgresql.org/docs/8.3/static/sql-copy.html
 
--
Shoaib Mir
http://shoaibmir.wordpress.com/

Re: Import (.CVS File) to postgreSql

От
Shoaib Mir
Дата:
On Tue, Aug 11, 2009 at 2:36 PM, Premila Devi <premiladevi.dayalan@agbnielsen.com> wrote:

Dear Sir,

 

I am really don’t understand Sir. May I have a screenshot on how to make these configuration sir.

 

The File is in CVS, as I attached before sir.



As I told you before just use the COPY command. You don't need to do any configurations and all.. just use the CSV option with COPY as explained in the manual. Its just like any other SQL statement once you have the database server installed.


Please do not post privately to my email as its always better posting it to the list.

--
Shoaib Mir
http://shoaibmir.wordpress.com/

Re: Import (.CVS File) to postgreSql

От
"A. Kretschmer"
Дата:
In response to Premila Devi :
> Dear All,
> 
>  
> 
> I like to import (.CVS File) to postgreSql.Could anyone help me. May I know,
> what the requirement.

You can use the COPY-command for that, see the doc.


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net