I need help with the regex pattern to add N before all string values in sql-statements
For example:
Before: SELECT * FROM table WHERE column = '123';
After: SELECT * FROM table WHERE column = N'123';
In that example, I can use this pattern: '[^']+'. However, I need help with pattern for this example:
Before: SELECT * FROM table WHERE column1 = 'One''Two' AND column2 = 'abc';
After: SELECT * FROM table WHERE column1 = N'One''Two' AND column2 = N'abc';
If there's a double '', it should skip those.
Information about my problem: You must precede all Unicode strings with a prefix N when you deal with Unicode string constants in SQL Server