Fixed column format data

Started by Bruce Momjianover 22 years ago2 messagesgeneral
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Is there any facility to import a text file that's in fixed column format? The
copy command seems to use a delimiter only. I have no delimiter, but have
specified column widths.

Are the only ways to either do many insert queries, or preprocess the file
into a delimited file and then copy?

--
greg

#2Shridhar Daithankar
shridhar_daithankar@myrealbox.com
In reply to: Bruce Momjian (#1)
Re: Fixed column format data

On Thursday 06 November 2003 21:00, Greg Stark wrote:

Is there any facility to import a text file that's in fixed column format?
The copy command seems to use a delimiter only. I have no delimiter, but
have specified column widths.

Are the only ways to either do many insert queries, or preprocess the file
into a delimited file and then copy?

Well, a simple C program would do the job, isn't it? Of course there could be
some scripting solutions but I don't have anything offhand..

Shridhar