"pmclinn" <pm*****@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I have data stored in the following fashion:
Interface Name, Mac Address11,0000001234
12,0000000235
12,0000000005
13,000003341A
12,00ca000000
...
I'm looking for this result:
on interface 12 = found 3 macs
on interface 13 = found 1 mac
What is the best way to accomplish this sql like task?
How about a HashTable? (air code)
For Each eLine as String? in yourData
key = KeyOf( eLine )
If table.Contains( key ) Then
table.Item( key ) = 1 + CInt( table.Item( key ) )
Else
table.Add( key, 1 )
End If
Next
For Each eItem as DictionaryEntry in table
? DirectCast( eItem.Key, String )
? CInt( eItem.Value )
Next
HTH,
Phill W.