[Info-ingres] Loading a file with embedded commas
twenty-six at b-mint.net
twenty-six at b-mint.net
Mon Dec 15 09:46:22 UTC 2014
I have a file with records that look like this:
"key1","key2","varchar data, containing commas.","16-dec-2014"
etc.
I want to load this into a Ingres table, but without the double quotes
surrounding each data value. The 3rd field is some varchar text which
contains commas.
I don't think the native Ingres copy statement will be able to strip the
double quotes? What's my best option? This is on a linux box so I
have the full range of commandline tools available.
Somehow replace the commas outside the quotes with tabs, then remove all
the double quotes then load the resulting tab separated file?
Thanks.
More information about the Info-ingres
mailing list