how to handle with single quote in ms sql server
2011-12-29 17:27
471 查看
declare @lablesList varchar(max) = 'test1&test2'
set @lablesList = Replace(@lablesList, '&', ''',''')
set @lablesList = ''''+ @lablesList +''''
select @lablesList
set @lablesList = Replace(@lablesList, '&', ''',''')
set @lablesList = ''''+ @lablesList +''''
select @lablesList
相关文章推荐
- How to monitor blocking in SQL Server 2005 and in SQL Server 2000 [ZT-MS]
- How to handle the space in column with awk?
- how to add linked server in SQL server.
- How to remove UCS-2 surrogate pairs in SQL Server?
- How to Get First and Last Day of a Month in SQL Server
- How to format datetime & date in Sql Server 2005
- How to check the MS SQL Server job run status by using Script
- How to Find All SQL Server Instance Running in Local Network c#
- [转][ASP.NET]How to easily insert row in GridView with SqlDataSource?
- How to create a hyperlink in SQL Server Reporting Services
- How to convert from string to datetime in sql server? - Sealyu - BlogJava
- How to Alter a Replicated Article in SQL Server 2005
- MS SQL Server - How to change an existing column to auto-increment column
- How to Find All SQL Server Instance Running in Local Network c#
- How to troubleshoot SQL Server performance issues - zt from MS
- How to Implement an Automatic Sliding Window in a Partitioned Table on SQL Server 2005
- How to enable remote connections in SQL Server 2008?
- HOW TO: Change the Owner of a User-Defined Data Type That Is in Use in SQL Server 2000
- How to create a PictureMarkerSymbol (Picture Symbol)in ArcGIS server with C#
- How to select the data type in SQLserver database such as varchar, nvarchar