[RndTbl] CSV files

John Lange john.lange at bighostbox.com
Tue Jul 13 13:10:33 CDT 2004

Yup "a little awk/perl/sed" is a solution.

Unfortunately I'm no regexp-ert so its many hours for me to perfect
something like that.

If there is an odd number of quotes, read the next line, paste it to the
first and repeat until the line has an even number of quotes and then
write it to a new file.

That does sound feasible.

I had been writing some perl but I hadn't thought of looking for an even
number of quotes so perhaps that will simplify things. I will try that

The Access developer now says that he can write a function to substitute
all cr/lf combinations with <br> which will solve the problem. If that
fails I will fall back on the perl.

By the way, the mdbtools would have been the perfect solution but it
didn't end up working because this is an Access2 database which isn't
supported with mdbtools.

Thanks guys.


On Tue, 2004-07-13 at 08:56, Glen Ditchfield wrote:
> On Monday 12 July 2004 22:59, John Lange wrote:
> > if there are any text or memo fields in Access that happen
> > to contain CR/LF Access does not strip them or escape them in any way.
> > The results in a CSV file with end of line markers in the middle of data
> > fields.
> IIRC, Access always wraps double quotes around text/memo fields, or at least 
> can be told to do so.  If so, a CR/LF will give you a line with an odd number 
> of double quotes.  A little awk/perl/sed script could look for odd lines and 
> paste the next line onto it...
> _______________________________________________
> Roundtable mailing list
> Roundtable at muug.mb.ca
> http://www.muug.mb.ca/mailman/listinfo/roundtable

More information about the Roundtable mailing list