Hi
In Visual Basic does anyone have details on grouping data from a dataset or dataview to another dataset or even a dataview.
ie. As an example only - I have data as such:
Pink, 10
Green, 20
Pink, 1
Red, 12
Red, 1
Blue, 50
Pink, 1
in a dataset (7 records). What I want to do is have a simple way of Grouping these records so I can create a dataset from it as such
i.e.,
Colour, Count, Sum
Pink, 3, 12
Green, 1, 20
Red, 2, 13
Blue, 1, 50
I know I can go back to the database and issue an SQL statement to get this bit I need to be able to do it on the dataset that was already retrieved from the database.
regards
Kieran777
In Visual Basic does anyone have details on grouping data from a dataset or dataview to another dataset or even a dataview.
ie. As an example only - I have data as such:
Pink, 10
Green, 20
Pink, 1
Red, 12
Red, 1
Blue, 50
Pink, 1
in a dataset (7 records). What I want to do is have a simple way of Grouping these records so I can create a dataset from it as such
i.e.,
Colour, Count, Sum
Pink, 3, 12
Green, 1, 20
Red, 2, 13
Blue, 1, 50
I know I can go back to the database and issue an SQL statement to get this bit I need to be able to do it on the dataset that was already retrieved from the database.
regards
Kieran777