473,385 Members | 1,769 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,385 software developers and data experts.

Combining Datasets

I have a table containing the following fields:
rep numbers, year, month, qty, revenue, credit apps, new accounts.

The data in this table reflects the rep's daily numbers. What I need to do
is sum the columns and rank each column totals against all the records in
the table. For example - assume that the figure below are the monthly
totals for four reps.
Rep Number Year Month Qty Revenue Credit Apps
New Accounts
100 2004 1 5 120,000.00
15 7
101 2004 1 15 90,000.00
4 0
102 2004 1 7 30,000.00
22 3
103 2004 1 4 60,000.00
11 17
Now I must rank the reps accordingly and display the following on a
datagrid!!!:
Rep Number Year Month QtyRank Qty RevenueRank
Revenue CreditAppsRank Credit Apps NewAccounts Rank New
Accounts
100 2004 1 3 5 1
120,000.00 4 5 2
10
101 2004 1 1 15 4
30,000.00 2 14 3
15
102 2004 1 2 7 3
60,000.00 1 22 4
3
103 2004 1 4 4 2
90,000.00 3 11 1
17

"
To get the rankings I ran four query that returned the rep number and the
sum from each column by descending sum order (1 column per query - "select
repnum, sum(qty) from table" - "select repnum, sum(revenue) from table"...)

After retrieving all the records, I call a routine the goes through every
record in each dataset.table(x) and added a column ranking to each table
with the dataset.

My problem and question come from this part. How do I display a datagrid
where I combine the four dataset.tables() into one datagrid??? I thought of
data relations, but as you can see, the four tables do not have a parent -
child relationship. Can anyone see a way for me to do this??? If so,
please give me a brief sample. I have spent a better part of the week
researching this but have yet to find an easy solution!!! There may not be
an easy solution, however, I thought of everything from a stored procedure
to creating a data table in asp.net (VB) code. The stored procedure was a
bit complicated and the data table was not very cost efficient when it came
to speed.
Help!!!!

Thanks,
Julio
Nov 18 '05 #1
0 972

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

Similar topics

2
by: Chris Mullins | last post by:
I've spent a bit of time over the last year trying to implement RFC 3454 (Preparation of Internationalized Strings, aka 'StringPrep'). This RFC is also a dependency for RFC 3491...
3
by: Tome73 | last post by:
How can I easily add the rows of DataTable1 to the rows of DataTable2. Both queries are from the same table. I can always use the column names with myRow, but I was wishing for a shortcut. When I...
4
by: Alpha | last post by:
I have a small Window application and through out the different forms I create a different dataset. At the begining I used the Tools to drag and drop the SqlDataAdapter, connection and dataset...
6
by: Red | last post by:
Hi all, I would like to ask how to combine 2 field into one column. For example I have field first name and last name. When I show it to the datagrid I want to show it as one column, for...
9
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
0
by: robin9876 | last post by:
In .Net v1.1 I have a few datasets which I would like to combine. They are all in the same format such as a date, int and double fields and they need to output to another dataset that is date, int...
0
by: S.Tedeschi | last post by:
Hi all; as posted some days ago, I'm converting an on-line app; I used to heavily rely on strongly-typed DataSets directly dropped onto pages, and so viewed by code(-behind) as well. In the next...
12
by: BillE | last post by:
I'm trying to decide if it is better to use typed datasets or business objects, so I would appreciate any thoughts from someone with more experience. When I use a business object to populate a...
3
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one...
9
by: gardnern | last post by:
We have X number of data sets, of Y length each. For example... Small, Medium, Large and Red, Green, Blue, Yellow We need to generate a list of all possibilities Small Red
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.