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
 General SQL Server Forums
 New to SQL Server Programming
 How to INSERT INTO if the string has comma's etc.

Author  Topic 

geoffHome
Starting Member

1 Post

Posted - 2007-03-04 : 05:38:08
It's probably a most basic operation but I can't find how to enable this. Using SQL Server 2005

eg: how would I get this sort of step to work?

INSERT INTO company VALUES (10001,"Apps'r'Us");

where the schema is
(companyID int,
companyName varchar(50))

spejbl
Starting Member

28 Posts

Posted - 2007-03-04 : 05:57:28
All you have to do is embed two quote characters where you want one.
SQL Server will interpret it as one.

INSERT INTO company VALUES (10001, 'Apps''r''Us')

kb
[url]http://kbupdate.info/[/url]
Go to Top of Page
   

- Advertisement -