Question: I'm importing CSV file in MySQL database with ColdFusion, my code works fine but I have one issue. I want to ignore double quotes around the words. So my csv looks like this: "John","Mark","Peter" . Every time after I insert CSV in database I'm getting double quotes around my words. Is there any command in ColdFusion that I can use to prevent double quotes? I tried to use trim but that did not work. If you know anything that can help please let me know.

Answer: 
You can use `cfhttp` to read a CSV file into a cfquery object. For example:

my.csv file contents:

```
"forename","surname","id"
"fred","blogs",1000
"jim","smith",2000

```

You can then read it in like so:

```
<cfhttp url="http://scratch.localhost/my.csv" method="get" name="mydata">
<cfdump var="#mydata#">

```

mydata will be a cfquery object so you can then simply loop over it. The double quotes will be removed and it will look like:

```
    FORENAME  ID    SURNAME
1   fred      1000  blogs
2   jim       2000  smith

```

If you do it this way, then you will need to make your CSV available over http. In a local dev environment this is fine, but don't do this in production. So I'd only recommend this for one off imports (in a restricted environment) or if the data is publicly accessible anyway.

Otherwise go with [Adam Cameron's](https://stackoverflow.com/users/894061/adam-cameron) answer.
Well you can replace the double quotes by using the conveniently-named & imminently guessable [`replace()`](https://wikidocs.adobe.com/wiki/display/coldfusionen/Replace) function. However... you might not want to get rid of all of them. Double-quote string delimiters are how CSV deals with data values with embedded commas or new line characters in them (see the [CSV RFC](https://www.ietf.org/rfc/rfc4180.txt)). If you know you won't have any of those, I can see no harm in getting rid.

That said... a better way might be to not put the quotes in there in the first place, rather than having them and needing to get rid of them. This is the approach *I'd* take with this, if poss.