[thelist] Tip Late Payment: SQL

Annie Phelan aphelan at norlink.net
Tue Jul 4 15:15:15 CDT 2000


Oops. I seem to have sent a few off topic messages without paying my dues, so
here's the payment :)

<tip author="Annie(aphelan at norlink.net)" type="SQL">
If you're placing a text string into a SQL Server table containing embedded
single quote, place a second single quote beside it. If not, SQL Server will
assume that the text string ends at the first single embedded quote causing
an Incorrect Syntax error.

For example: The word "it's" would be formatted 'it''s' in order to be
inserted correctly into the table.

The two single quotes are interpreted by SQL Server as a single embedded quote
and voila!
</tip>





More information about the thelist mailing list