Oracle Group By, Multiple Groups
Oracle Group By, Multiple Groups
(OP)
Hard to describe what I want to do, here is an example.
I have the following data
1 a
2 a
3 a
4 b
5 b
6 a
7 a
8 c
9 c
I want a group to return
a 3
b 2
a 2
c 2
but the Group by function returns as you know
a 5
b 2
c 2
I can get the result I want using VB.net by creating a new dataset as I loop through an existing one but I want to return the result directly from Oracle to Wonderware as a view. Any Ideas?
I have the following data
1 a
2 a
3 a
4 b
5 b
6 a
7 a
8 c
9 c
I want a group to return
a 3
b 2
a 2
c 2
but the Group by function returns as you know
a 5
b 2
c 2
I can get the result I want using VB.net by creating a new dataset as I loop through an existing one but I want to return the result directly from Oracle to Wonderware as a view. Any Ideas?





RE: Oracle Group By, Multiple Groups
One possible resolution would be to use an extra field when you write the data whose value increments only on a change in your first field data. You can then group on the new field.
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
UK steam enthusiasts: www.essexsteam.co.uk
RE: Oracle Group By, Multiple Groups