Iamthestig
Programmer
We have some corrupt data in our tblCompanyHistory table.
I need to find the records Grouped by CREF that have a comp_order not starting with 1.
Here is some data.
CREF Comp_Order
--------------------
8 1
8 2
8 3
9 2
9 3
10 1
11 3
11 4
So CREF 8 and 10 are valid but 9 and 11 are not.
The Comp_Order should always begin with 1.
I think I need to use MAX, I am going to look into it but
any help much appreciated.
Thanks
I need to find the records Grouped by CREF that have a comp_order not starting with 1.
Here is some data.
CREF Comp_Order
--------------------
8 1
8 2
8 3
9 2
9 3
10 1
11 3
11 4
So CREF 8 and 10 are valid but 9 and 11 are not.
The Comp_Order should always begin with 1.
I think I need to use MAX, I am going to look into it but
any help much appreciated.
Thanks