Link to home
Start Free TrialLog in
Avatar of mainrotor
mainrotor

asked on

I need help writing a C# console app.

Hi Experts,
I need help writing a C# console application with SQL Server 2005 DB.  The table I will be querying has thousands of records so It needs to be multi-threaded.  The program needs two functions.  
One that calculates the Product of all ItemCost values by ItemCategory.
The second function needs to calculate the Median value of ItemCost by ItemCategory.

The name of my SQL table is  INVENTORY with the fields ItemCost (float), ItemCategory (varchar).

How can I do this?

Thanks in advance,
mrotor
Avatar of kaufmed
kaufmed
Flag of United States of America image

Why does this need to be multi-threaded? "Thousands" is not very large in terms of DB processing.
Avatar of mainrotor
mainrotor

ASKER

It has to be multi-threaded because it will eventually grow to millions of records.
ASKER CERTIFIED SOLUTION
Avatar of Todd Gerbert
Todd Gerbert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
...and also, if it's a remote SQL server, all the connections will be using the same network connection.  So if it's a lot of data being transferred, that might present a bottleneck too.  
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial