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
What is it supposed to do? Can you provide some example of how it's used? That could help figure out if it's a scalar function or table valued, what the parameters are supposed to be, and what the output should look like.
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