October 4, 2002 at 10:25 am
How do i insert the special character "'" into a table field in a T-SQL INSERT command.
Ex: INSERT INTO TABLE (FIELD) VALUES('?')
October 4, 2002 at 11:00 am
try this:
INSERT INTO TABLE (FIELD) VALUES('''')
Robert Marda
SQL Server will deliver its data any way you want it
when you give your SQL Programmer enough developing time.
Robert W. Marda
Billing and OSS Specialist - SQL Programmer
MCL Systems
October 4, 2002 at 11:03 am
You can also use the ascii value of the character, as in char(39) for a single quote character.
Steve Armistead,
Database Administration
Panther Systems Northwest, Inc.
Vancouver, WA
Steve
October 4, 2002 at 6:18 pm
The key to output a single quote is put two single quotes in the input such as ' would be submitted as '''' and '' single quotes submitted as ''''''.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply