BACKUP DATABASE [DMT] TO
DISK = N'/var/opt/mssql/data/DMT.bak'
WITH NOFORMAT, NOINIT, NAME = N'DMT-
Full Database Backup',
SKIP, NOREWIND,
NOUNLOAD,
STATS = 10
GO
BACKUP DATABASE [DMT] TO
DISK = N'/var/opt/mssql/data/DMT.bak'
WITH NOFORMAT, NOINIT, NAME = N'DMT-
Full Database Backup',
SKIP, NOREWIND,
NOUNLOAD,
STATS = 10
GO
CREATE FUNCTION REMOVE_DUPLICATE_CHAR_FROM_STRING(@val NVARCHAR(500))
RETURNS NVARCHAR(500)
as
begin
DECLARE @result nVARCHAR(50);
set @result=''
DECLARE @prev CHAR(1)
set @prev=''
DECLARE @c CHAR(1)
set @c=''
DECLARE @i TINYINT
set @i=1
DECLARE @len TINYINT;
SET @len = LEN(@val);
WHILE(@i <= @len)
begin
SET @c = SUBSTRING(@val, @i, 1);
IF @c != @prev
begin
SET @result = CONCAT(@result, @c);
SET @prev = @c;
end
else
begin
SET @i = @i + 1;
end
END
return @result;
end