I am using Excel to run paramaterized SQL Server Queries. Everything works fine, except when the parameter has a apostrophe. For example, let's say my syntax is this
Select * from testtable where arovaica = @passedvalue
And in Excel @passedvalue is set to Michael's
I get an error of
Incorrect syntax
How should I encapsulate this variable with an apostrophe in order for SQL to compile properly?