Results 1 to 2 of 2

Thread: string count

  1. #1
    Join Date
    Sep 2004

    Unanswered: string count

    I have a string that contains a group of numbers and I want a count of what is in the string except for duplicates. For example, I get this output in my string....(,594070,101348,100712,100290,100290,101 012)

    So the count as I would like would be 5. In any instance of a duplicate I would like for it to count only as one. So how would I go about counting what's in this string to get the desired result? Thanks!

  2. #2
    Join Date
    Aug 2004
    if you trying to do this in ASP, it will need far more code.

    I'll try to post a kinda pseudo for you.

    1. use Split() function in vbscriptto create a string array from this comma
    separated string.
    2. write a loop to eliminate the repititive items.
    3. Write a loop to count the matches.

    Hope this helps.
    In GOD we believe. Everything else we Test!

Posting Permissions

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