If you ever need to sort character strings stored in SQL Server fields, check out this demonstration of how to write a common sorting algorithm using SQL Server TSQL code. You are probably familiar ...
Recently I encountered a problem in a stored procedure that was caused by an unexpected result from the SQL Server ISNUMERIC() function. I was using SQL Server 2008 R2 but the issue has long been ...
What you want to do is insert the data in the database with the ' replaced with '' . This escapes the apostrophe and won't mess up the query.