Results 1 to 4 of 4

Thread: Parsing

  1. #1
    Join Date
    Dec 2003
    Posts
    20

    Unanswered: Parsing

    Hey all. I would like to thank dbforums for their assistance in the past.
    I currently have a database that has a Part Number Field. The data is scanned in via a bar code. The data is formatted ex: :100:348-111-111:
    I would like to parse into (2) separate fields after scanning. Ex field 1:100 and field 2 348-111-111
    thanks for any help in this matter.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    There several approaches
    if the separator is fixe eg its always at character position 4
    term1 = left(scannedvar, 3)
    Term2 = mid(scannedvar, 5)

    If its variable then use instr to locate the positio to split the text
    instr gives the location of the specified symbol(s) if found
    could use the split function in place of instr
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Dec 2003
    Posts
    20
    Thks for your quick response. Unfortunately the ex 100 is a quantity and can change to any var. Ex 10 , 1000

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    So how do you know what separates the quantity from the partnumber.
    Use instr to find the location of that symbol
    Then extract the data using left and mid functions as suggested in post #2
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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