mbt masai
 
Welcome !
         

                                
After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.

 Sum duplicate line in loop

Author Message
absolvo

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 2/19/2010
  • Status: offline
Sum duplicate line in loop Friday, February 19, 2010 11:09 AM (permalink)
0
Hello!
I need your help, because i can't do it by myself.
I have a task, with old vbs script, and a can't do one moment.I have a loop:

do while not rs.EOF 
line = line&i&Cost&" 06 "&m&"."&y &dep &crlf 
Response.Write(line) 
loop  

And a have result (i write simple exmp.): 1
1
2
3
4
5
5
6
7
8
8
9

It's work fine, but in result i have duplicate lines. I can delete duplicate, but i need sum them.
I can't use this .txt, because user get it with header (Response.AddHeader "Content-Disposition", "attachment;filename=inetsums.txt").
How i can do it? 

Thanks.


Dimitry Wolotko
#1
    ebgreen

    • Total Posts : 8088
    • Scores: 95
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    Re:Sum duplicate line in loop Sunday, February 21, 2010 4:11 AM (permalink)
    0
    I'm not sure that I understand. You want to count how many duplicate lines are in the file?
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.8
      mbt shoes www.wileywilson.com