Damned filter. Anything quoted once is my post. Grrr...
> database,sql,query,table
> Erica Douglass writes:
>
> > I have a text file that is fixed-width delimited (that is, fields are
> > delimited by certain column widths.)
> >
> > What is the workaround for this? Will importing large files work if I have
> > tab-delimited rows? If so, what is the procedure to convert from
> > fixed-width delimited to tab-delimited?
>
> Yep, there's no way to specify a format like that with LOAD
> DATA INFILE, but tab-separated files work like a charm. I'd
> probably use sed to convert the data. Here's an example of
> something that would do the job for 3-column data with
> 3 characters in the first column and 4 in the second. Note
> that it doesn't strip trailing spaces from the fields.
> sed "s/^\(.\{3\}\)\(.\{4\}\)/\1\T\2T/\3" filename >filename.tab
> Replace the letter T with tab. You might have to hit
> ctrl-v tab to get a tab in the shell.
>
> //C
>
> --
> Carl Troein - C�rdan / Istari-PixelMagic - UIN 16353280
> [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
> Amiga user since '89, and damned proud of it too.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php