Hi folks,
In reviewing our merge procedures (both business and SQL) I find that our version of LP_CONST_MERGE references a local function called LF_StripCharacters - our database doesn't have this function, so some of our merges are failing.
Does anyone else have a copy/version they'd let me have?
Martin
Hi Martin,
Not sure if you still need this now that you have everything that Brian posted, but here's the LF_StripCharacters function that we have:
USE [impresario]
GO
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE FUNCTION [dbo].[lf_StripCharacters]
(
@String NVARCHAR(MAX),
@MatchExpression VARCHAR(255)
)
RETURNS NVARCHAR(MAX)
AS
BEGIN
SET @MatchExpression = '%['+@MatchExpression+']%'
WHILE PatIndex(@MatchExpression, @String) > 0
SET @String = Stuff(@String, PatIndex(@MatchExpression, @String), 1, '')
RETURN @String
END