Importing lines of variable length from ASCII

From: "Louis Becker" <Louis(dot)Becker(at)leo(dot)na>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Importing lines of variable length from ASCII
Date: 2010-02-25 11:04:00
Message-ID: 21A6A90E7CD2584DB72892049E1DE78F0167F0B0@MAIL01.99eight.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi

I have an ASCII file that I try to import via the COPY command. The
ASCII file is pipe delimited. Some lines in the file have no value in
the last field and because there is no value in the last field, it also
omits the last delimiter. It therefore seems that some lines have 11
columns while some other lines have 10 columns although these 10 columns
correspond with the first 10 columns of lines that contain 11 columns.
The omission of the last delimiter apparently is an accordance with the
CSV files standard.

Apart from editing the ASCII files, is there a way to import these files
that contain lines of variable length?

Louis

DISCLAIMER
This message is intended solely for the individual(s) and entity(s) to which it is addressed. It is confidential and may contain legally privileged information.
Any unauthorized review, use, copying, storage, disclosure or distribution of this e-mail and any attachments is strictly prohibited. If you are not the named
recipient or have otherwise received this communication in error, please destroy this message from your system and kindly notify the sender by e-mail.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message A. Kretschmer 2010-02-25 11:52:19 Re: Importing lines of variable length from ASCII
Previous Message Jasen Betts 2010-02-25 09:26:18 Re: Migration from INFORMIX to POSTGRESQL