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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to escape ' (quote) in insert statement

Author  Topic 

abc123
Starting Member

47 Posts

Posted - 2008-11-21 : 00:28:20
I have some data to insert into table.
data is as follow

insrt into table (col1, col2) values ('ABC'L','XYZ'L)

how I can escape the " ' " (qoute) which is near to L (ABC'L)?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-21 : 01:37:09
[code]insrt into table (col1, col2) values ('ABC''L','XYZ''L')[/code]
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-21 : 01:39:26
also see this

http://sqlblogcasts.com/blogs/madhivanan/archive/2008/02/19/understanding-single-quotes.aspx
Go to Top of Page
   

- Advertisement -