Forum Replies Created

Viewing 15 posts - 361 through 375 (of 616 total)

  • RE: split string to three parts

    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...

  • RE: split string to three parts

    Because I'm a stupid little boy!

    Such an easy solution. Thanks mate.

  • RE: Scalar function too slow

    So many views and no replies?! Where are the clever guys these days?! :crying:

  • RE: split string to three parts

    That's perfect mate thanks!

  • RE: split string to three parts

    Hah... loko this is what I had come up with but I got errors when I tried various combinations:

    declare @string varchar(100) = 'surname, forename, middlename'

    declare @string varchar(100) = ', forename,...

  • RE: Split String into 3 parts with a twist!

    mickyT thanks so much for this! I forgot to thank you in my other thread!

    Your help is much appreciated!

  • RE: Splitting postcodes

    This I've answered my own question with this:

    select postcode, LEFT(postcode,LEN(postcode)-3) + ' ' + RIGHT(postcode,3)

    from flatrecord_SemiPerm

    where PATINDEX('[A-Z][A-Z][0-9][0-9][0-9][A-Z]%', postcode) > 0

  • RE: Split String into 3 parts with a twist!

    I should have been clearer with my problem definition!

    The rules are as follows:

    I have a string = 'A B C D EFG ProperWord QR S T'

    I want to generate...

  • RE: Split String into 3 parts with a twist!

    Thanks dwain.

    You should see what I came up with lol... ii's shockingly bad compared to yours.

    Mine has so many IF statments lol!

  • RE: SQL design discussion - help required

    I've replaced the picture with XML text instead!

  • RE: SQL design discussion - help required

    Yes, I have this covered in another section of the XML file where the match keys are defined.

    Okay can you guys see both pictures now? I wonder if this is...

  • RE: Nested replaces ?

    Thanks Chris.

    I'm probably being stupid, but I've tried to modify the function so it works off a permanent table which looks like this:

    And the function is changed to:

    ALTER FUNCTION [dbo].[NoiseRemover]...

  • RE: SQL design discussion - help required

    Okay can you see one of the pictures now?

  • RE: Nested replaces ?

    I have a one table which contains various noise words which I would like to remove from the company name field before I generate my phoentic code. The list can...

  • RE: Nested replaces ?

    Steven Willis (1/23/2013)


    Wow...I'm impressed! I don't think the OP realized the impact of his request! The more I think about this the more uses I can see for such a...

Viewing 15 posts - 361 through 375 (of 616 total)