I have an SQL statement in an app that I'm modifying in which the value for the WHERE condition can have a single or a double quote in it and though I haven't seen it yet, it's probably just a matter of time when that value will contain both a single AND double quote.

I can't seem to come up with a function to handle both and return a valid value without getting syntax errors.

Thanks in advance.

-Jack