replace a string

  • Hi,

    I would like to a replace a string with a new string.

    replace <PolicyNum xmlns="MedMal">QN0004908</PolicyNum>

    with a new value like

    <PolicyNum xmlns="MedMal">ABCDEFG</PolicyNum>

    here QN0004908 is a dynamically generated number.So it will vary.

    But i know its lenth will be 9 digits all the time.

    from a string value like this (table filed)

    <NameInsured xmlns="PolNum">Test Number</NameInsured><PolicyNum xmlns="PolNum">QN0004908</PolicyNum><EndorsementNum xmlns="PolNum">

    I think i will add this to a stored procedure in Sql server.

    Thanks

  • Are you asking for help writing this becasue you want to encorporate it in a stored procedure?

  • Yes.Need to add in to a stored procedure.

    Since I did not get any reply, I found out the solution myself.

    Thanks anyway.

  • Okay, well I am happy to help if I can, but I just wanted to make sure I understood your request thoroughly before I attempted to help. Anyway, just post back if you need any further help or features with your stored procedure.

  • jayanp (5/7/2010)


    Yes.Need to add in to a stored procedure.

    Since I did not get any reply, I found out the solution myself.

    Thanks anyway.

    I understand the disappointment of "no reply", but what did you come up with?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply