case 3230 - Recostructing query to handle single and double quotes.