Updating into string function mssql

A numeric argument is converted to its equivalent binary string form; if you want to avoid that, you can use an explicit type cast, as in this example − SELECT CONCAT('My', 'S', 'QL'); --------------------------------------------------------- | CONCAT('My', 'S', 'QL') | --------------------------------------------------------- | My SQL | --------------------------------------------------------- 1 row in set (0.00 sec) CONCAT_WS() stands for Concatenate With Separator and is a special form of CONCAT().

The first argument is the separator for the rest of the arguments.

Returns the string that results from concatenating the arguments. If all arguments are non-binary strings, the result is a non-binary string.

If the arguments include any binary strings, the result is a binary string.

For more information, see WITH common_table_expression (Transact-SQL). For information about table hints, see Table Hints (Transact-SQL).

To deal with this de-normalized data, you may need to normalize it to work with each single value separately in your SQL Server code or provide this normalized data to another data source.CREATE TABLE tbl_Personal Detail (ID INT IDENTITY ,[Date] nvarchar(20), Name nvarchar(20), Gender ID int); INSERT INTO Tbl_Personal Detail VALUES(N'18-4-2015', N'Monay', 2), (N'31-3-2015', N'Monay', 2), (N'', N'Monay', 2), (N'19-4-2015', N'Monay', 2) DECLARE @Date Nvarchar(200) SET @Date = (SELECT [Date] FROM Tbl_Personal Detail WHERE ID = 2) Update Tbl_Personal Detail SET [Date] = (REPLACE(@Date , '-','/')) WHERE ID = 2 From review queue: May I request you to please add some context around your source-code. It will help the asker and future readers both if you can add more information in your post.Specifies the temporary named result set or view, also known as common table expression (CTE), defined within the scope of the UPDATE statement.This product release contains a new function called STRING_SPLIT() that solves this business problem. Microsoft has adopted a cloud first release strategy.It is not surprising that this function is already available for Azure SQL Database.