• That is true. There are some situations where this wouldn't work well but replacing thi:

    SET @Master_Surname = LEFT(@Master_mkNormalisedName, CHARINDEX(',',@Master_mkNormalisedName)-1)

    SET @Master_Forename = LEFT(SUBSTRING(@Master_mkNormalisedName, CHARINDEX(',',@Master_mkNormalisedName)+1,

    LEN(@Master_mkNormalisedName)), CHARINDEX(',',SUBSTRING(@Master_mkNormalisedName,

    CHARINDEX(',',@Master_mkNormalisedName)+1,LEN(@Master_mkNormalisedName)))-1)

    SET @Master_MiddleName = REVERSE(LEFT(REVERSE(@Master_mkNormalisedName), CHARINDEX(',',REVERSE(@Master_mkNormalisedName))-1))

    -- get the normalised name parts and the phonetic name parts for the duplicate record

    SET @Duplicate_Surname = LEFT(@Duplicate_mkNormalisedName, CHARINDEX(',',@Duplicate_mkNormalisedName)-1)

    SET @Duplicate_Forename = LEFT(SUBSTRING(@Duplicate_mkNormalisedName, CHARINDEX(',',@Duplicate_mkNormalisedName)+1,

    LEN(@Duplicate_mkNormalisedName)), CHARINDEX(',',SUBSTRING(@Duplicate_mkNormalisedName,

    CHARINDEX(',',@Duplicate_mkNormalisedName)+1,LEN(@Duplicate_mkNormalisedName)))-1)

    SET @Duplicate_MiddleName = REVERSE(LEFT(REVERSE(@Duplicate_mkNormalisedName), CHARINDEX(',',REVERSE(@Duplicate_mkNormalisedName))-1))

    With :

    -- get the normalised name parts and the phonetic name parts for the master record

    SELECT @Master_Surname = CASE ItemNumber WHEN 1 THEN Item ELSE @Master_Surname END

    ,@Master_Forename = CASE ItemNumber WHEN 2 THEN Item ELSE @Master_Forename END

    ,@Master_MiddleName = CASE ItemNumber WHEN 3 THEN Item ELSE @Master_MiddleName END

    FROM dbo.DelimitedSplit8K(@Master_mkNormalisedName, ',')

    -- get the normalised name parts and the phonetic name parts for the duplicate record

    SELECT @Duplicate_Surname = CASE ItemNumber WHEN 1 THEN Item ELSE @Duplicate_Surname END

    ,@Duplicate_Forename = CASE ItemNumber WHEN 2 THEN Item ELSE @Duplicate_Forename END

    ,@Duplicate_MiddleName = CASE ItemNumber WHEN 3 THEN Item ELSE @Duplicate_MiddleName END

    FROM dbo.DelimitedSplit8K(@Duplicate_mkNormalisedName, ',')

    Is so much better!

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn