Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Apostrophe in char field
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01030639
Message ID:
01030645
Vues:
12
>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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform