Could someone explain why I had to type 10 single quotes here just to get it to store ” in the column? I’m trying to understand the logic to this..
exec('UPDATE [SomeTable] SET [SomeColumn] = '''''''''''', [AnotherColumn] = Null ')
I kept adding quotes until I got the desired output I wanted but now I would like to know why I had to put in so many quotes.
A code to insert ” into the table would look like this:
However, because you’re executing this inside another string, you’ll need to escape the escaped quotes, resulting in the code you gave.