Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Replacing Apostrophe

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-05-03 : 16:51:11
Dave writes "I've seen many examples for replacing the apostrophe by using two of them together. Example:

strExample = replace(strExample, "'", "''")


My question is this. I use the ascii numeric code for the apostrophe to replace it in my SQL scripts. Example:

strExample = replace(strExample, "'", "'")


Do you forsee any potential problems of using one method over the other or does it just come down to personal preference?"
   

- Advertisement -