SELECT DISTINCT query

Joined
Oct 2, 2007
Messages
14
Programming Experience
1-3
:confused:

Hello all, im trying to create a chart in vb.net. i have the charting control and what im trying to do is pull data from an access database but processing by group i.e

"SELECT DISTINCT SomeName FROM SomeTable" << im trying to figure out how i would group the data into an array so i can then process it in the charting control.

for example if i have a table with 3 columns "FirstName" "LastName" "Age" i want to query for all results group them by name, for instance if there where 5 "Joe's" and 10
"Steven's" In the first name column i want to pull that data out in groups (This is so hard to explain grrr!).

So i assume to begin with i have to fill a dataset then iterate through the rows and get a list of names and then go back through adding to the first list
of names i created with any duplicates found (Does this sound Right?) then i have to put the results for each group into an array by column, for example
"FirstName" "LastName" "Age".

Im really really stuck with this can some of the experts please advise on how i should go about this. So really there is a number of questions here
the SELECT DISTINCT query and how to put the grouped data into arrays.

Lots of thanks

Domino.VBcoder
 
Kind of

could you explain what that does so i could understand it better please:eek:

can that be used with a JETOLE 4 connection?

and how would i put the groups into array.

domino.vbcoder
 
Firstly, this is obviously a data access question so it belongs in the Data Access forum. Please make the effort to post in the most appropriate forum. Moved.

You have to explain exactly what you want. It's not hard. You say you want to group the names. Great, but what information is it that you want to show for each name? Is it the number of people with that name? The average age of people with that name? Something else?
 
Youd be better off showing us the data you have now, and how you want it showing for your report
 
Back
Top