I want to run a simple query that in theory looks like this;
create a temporary table
Select firstlabno ,secondlabno, thirdlabno from sometable order by firstlabno ,secondlabno
then run through this dataset and detect when a change occurs in the value firstlabno
then do something to thirdlabno
In crystal reports there is something like 'on change of data'