sed removing comma inside double quotes

I have a csv file with lines like the followings

123456,"ABC CO., LTD","XXX"
789012,"DEF LIMITED", "XXX"

before I bcp this file to database, the comma in "CO.," need to be removed first.

My script is cat <filename> | sed 's/"CO.,"/"CO."/g'

but it doesn't work. Can anyone here able to help ? Thanks.

Try awk:

awk -v v='"' 'BEGIN{FS=OFS=v}{gsub(",","",$2);print }' file > newfile

you can tackle this problem from the source if possible. Get whatever application that produce the csv to use a different delimiter instead. Save you the trouble.