Fixing "error: syntax error at or near ")""
When trying to insert values containing the character `)`, the RegEx is not modifying the string properly, throwing this error message: `error: syntax error at or near ")"`. Here's an example: Initial value: `VALUES ( \'Current Generator(s)\',\'CurrentGenerators__c\',NULL,NULL,\'Lead\',\'2014-12-10 22:31:24.076 +00:00\',\'2014-12-10 22:31:24.076 +00:00\');` Current result: `SELECT \'Current Generator(s\',\'CurrentGenerators__c\',NULL,NULL,\'Lead\',\'2014-12-10 22:31:24.076 +00:00\',\'2014-12-10 22:31:24.076 +00:00\');` Expected result: `SELECT \'Current Generator(s)\',\'CurrentGenerators__c\',NULL,NULL,\'Lead\',\'2014-12-10 22:31:24.076 +00:00\',\'2014-12-10 22:31:24.076 +00:00\';` This commit is removing the `replace()` method called. After reading the blog post referred, there's no explanation of why this need to be replaced - and it is working fine without it.
Showing
with
1 additions
and
1 deletions
-
Please register or sign in to post a comment