I have a python tool in which an SQL query string make a layer:
"NAME " + "LIKE " + "'" + strField_NAME + "'"
However, it appears that I have some names containing quotes in my dataset! For example, Jimmy's Peak containing a single quote and thus crashing my script...
Is there any sort of escape character I could use in a Python script in order to build an SQL query?
For the time being, the query builds as NAME LIKE + 'Jimmy' because the name contains a single quote... and it should be NAME LIKE + Jimmy's Peak