Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2006
    Posts
    157

    Unanswered: Needs help in string handling

    Hi: This is the original string.
    strbuffer=2007022713495176690010323181 MTMASSTS03A20060913 OMSS HCS1

    Can any one please tell me how to i change the above string

    1.For Bankruptcyfilingdate then MTMASSTS03A20060913 will be MT+LNNSDT+CCYYMMDD
    2.For BankruptcyCaseNumberValue then MTMASSTS03A20060913 will be MT+LNNLCN+Case#
    3.For BankruptcyChapterNumberValue then MTMASSTS03A20060913 will be MT+MASBKC+Chapter#


    REQUIRED OUTPUT
    For Bankruptcyfilingdate, the original string has a date after MTMASSTS03A but it will be change after MT like that
    1.strbuffer1=2007022713495176690010323181 MTLNNSDT20060913 OMSS HCS1

    For BankruptcyCaseNumberValue="0627303JDL"
    2.strbuffer2=2007022713495176690010323181 MTLNNLCN0627303JDL OMSS HCS1

    For BankruptcyChapterNumberValue="7"
    3.strbuffer3=2007022713495176690010323181 MTMASBKC7 OMSS HCS1

    I mean after MT the values are change in the string strbuffer according to the new values. I need help without using query


    Thanks.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Sounds like a simple If statement will do this..?
    George
    Home | Blog

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    INSTR for each type (LNNSDT, LNNLCN, MASBKC) and copy the rest of the string to another string.
    SPLIT that result string and take the 0th element and MID the parts out ...

    Knowing you, under what conditions is this running under? Or where is this going to be run?
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Other string functions you may find useful:

    LEFT
    RIGHT
    MID
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •