Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Apostrophe in char field
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01030639
Message ID:
01030645
Views:
13
>I wanted to be sure that I am not overlooking something. Whenever I insert a record into SQL Server char field I check that the entry does not have an apostrophe. If yes, I replace it with two apostrophes. Then when I retrieve the string, I do the reverse conversion. Is this a typical pita you have to deal with when working with SQL Server?

To represent a single quote in the T-SQL string literal encloused into single quotes you've to double it. For examle 'O''Neil'. When you insert such value into a column, it became O'Neil (single quote). What the reason you're doing all those conversations?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform