Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COPY ERROR: Extra data after last expected column

Status
Not open for further replies.

MsHart2u

Programmer
Jul 16, 2003
30
US
Real simple. (Can you tell I'm frustrated), I created a table like so:
CREATE table test(colA int4, colB varchar(10) NOT NULL, colC date, colD text);

I have tab delimited text file being ftp'd to my linux box daily that looks like this (the 4th column is just a tab, I cannot get rid of):
3550 6041 01/04/05
3318 4622 01/04/05

3319 0910 01/04/05

3320 6765 01/04/05

3321 2941 01/04/05

3322 0279 01/04/05

So I want to import it using:
copy test(colA,colB,colC,colD) from '/home/sales/po_items.TXT' WITH DELIMITER '\t';

But I keep getting this error:
ERROR: copy: line 1, Extra data after last expected column

Please save me another day of hair pulling with the 'deer in the headlights' glare to my screen. Let me know the error of my ways.

Thank you and bless you in advance.

Kathy
When you dig another out of their troubles, you find a place to bury your own.—Anonymous
The person who says it can't be done shouldn't interrupt the person who is doing it.—Chinese Proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top