I have this sample T-SQL query and trying this on SQL-Server-2008.
DECLARE nvarchar(1000) @wstring = "I asked my son's teacher, "How is my son doing now?""
UPDATE tablename SET columnname = ' " & @wstring & " ' where ... blah ... blah
I know that the above query will throw error.
So how do I handle-escape both single and double quotes in an SQL-Update statement.
You can escape the quotes with a backslash:
"I asked my son's teacher, \"How is my son doing now?\""