Re: Problems importing csv files

From: Robert Schnabel <schnabelr(at)missouri(dot)edu>
To: Kindra Martinenko <kindramart(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Problems importing csv files
Date: 2009-06-22 23:29:24
Message-ID: 4A4013D4.2000809@missouri.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
Kindra Martinenko wrote:
<blockquote cite="mid:448995(dot)80419(dot)qm(at)web30207(dot)mail(dot)mud(dot)yahoo(dot)com"
type="cite">
<style type="text/css"><!-- DIV {margin:0px;} --></style>
<div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"><br>
<div>I tried:</div>
<div><font class="Apple-style-span"
face="'Courier New', courier, monaco, monospace, sans-serif"><br>
</font></div>
<div>
<div><font class="Apple-style-span"
face="'Courier New', courier, monaco, monospace, sans-serif">COPY
BaxterCommercial&nbsp;</font></div>
<div><font class="Apple-style-span"
face="'Courier New', courier, monaco, monospace, sans-serif">FROM
E'H:\\transpor\\Traffic Counts\\TMS\\MarApr09\\BaxterCommercial.csv'</font></div>
<div><font class="Apple-style-span"
face="'Courier New', courier, monaco, monospace, sans-serif">WITH CSV;</font></div>
<div><font class="Apple-style-span" face="'Courier New'"><br>
</font></div>
<div><font class="Apple-style-span"
face="arial, helvetica, sans-serif">And it returned with this error:</font></div>
<div><font class="Apple-style-span" face="'Courier New'"><br>
</font></div>
<div><font class="Apple-style-span"
face="'Courier New', courier, monaco, monospace, sans-serif"><br>
</font></div>
</div>
<div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"><font
class="Apple-style-span"
face="'Courier New', courier, monaco, monospace, sans-serif">ERROR:
&nbsp;relation "baxtercommercial" does not exis</font>t</div>
<div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"><br>
</div>
<div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;">Any
ideas? </div>
</div>
</blockquote>
I'm by no stretch an expert, I'd consider myself a novice, but I ran
into the same problem when I started.&nbsp; I assume you're using Windows
right?&nbsp; Does your table name contain uppercase the way you have it
written above?&nbsp; If it does, try changing the table name to all
lowercase and change your COPY statement to lowercase.&nbsp; That's what
worked for me.&nbsp; Scroll to the bottom of this link
<a class="moz-txt-link-freetext" href="http://www.postgresql.org/docs/8.0/interactive/ddl.html">http://www.postgresql.org/docs/8.0/interactive/ddl.html</a>&nbsp; I have
resorted to just making sure all of my table names are lowercase.<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 2.5 KB

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Alexandru Maximciuc 2009-06-23 21:26:22 table's last update time
Previous Message Kindra Martinenko 2009-06-22 23:15:40 Re: Problems importing csv files