473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Data Processing Q

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?

Nov 21 '05 #1
5 941
something like:

Select Interface, count(*) From MyTable Group By Interface

"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?

Nov 21 '05 #2
This got screwed up
Interface Name, Mac Address
11,0000001234
12,0000000235
12,0000000005
13,000003341A
12,00ca000000
....
I'm looking for this result:

on interface 11 = found 1 macs
on interface 12 = found 3 macs
on interface 13 = found 1 mac

Nov 21 '05 #3
LOL... In vb.net. The data is stored as a string in a single
arraylist.

Nov 21 '05 #4
"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.
Nov 21 '05 #5
That worked. Thanks!

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: ml | last post by:
My employers currently use Access for processing large volumes of data for reporting and simple modelling, which involves a lot of make table/update queries etc. I have been asked to work on a...
3
by: Shmulik | last post by:
I have an application written in C# that creates a queue of items to process, connects via a TCP connection to a server on a Unix box, and then passes data files to the Unix box for processing...
0
by: bpo_ccs | last post by:
We are into BPO and Software development business for past six and half years. We are looking for the following any kind of business from your end. Back Office Process Data Entry, Large Volume...
5
by: dmoran21 | last post by:
I am working with some files that I need to do some processing with. Essentially, these files contain rainfall reports from various automated rain gauges. These reports are given in 15 minute...
18
by: Joel Hedlund | last post by:
Hi! The question of type checking/enforcing has bothered me for a while, and since this newsgroup has a wealth of competence subscribed to it, I figured this would be a great way of learning...
8
by: CedricCicada | last post by:
Greetings! Here's my script: ######## start of script class ScannerCommand: taskName = '' scanList = def __init__(self):
14
by: Bob Nelson | last post by:
Does the current ISO standard for the C Programming language mention the term ``computer'' anywhere in the document? The ``Committee Draft'' dated January 1999 refers to only to a ``data processing...
2
by: colin | last post by:
Hi, Im tidying up some code ive written wich atm is all in the main form. its working reasonably well, uses zedgraph wich is nice, but i need to tidy it up as its become increasingly difficult...
1
KevinADC
by: KevinADC | last post by:
Introduction In part one we discussed the default sort function. In part two we will discuss more advanced techniques you can use to sort data. Some of the techniques might introduce unfamiliar...
0
by: tavares | last post by:
(Our apologies for cross-posting. We appreciate if you kindly distribute this information by your co- workers and colleagues.) ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.