Hi,
I have a table with the type of data as below,
sorted as follows, Case (ascending), Loc (ascending) and Transaction Date (ascending).
I am trying to count the records like this, the first record where Facility = Store-A as record number 1, next three records where Facility = Warehouse-1 as record number 2, next record where Facility = Store-B as record number 3, next record where Facility = Warehouse-1 as record number 4,next record where Facility = Store-C as record number 5 and next two records where Facility = Warehouse-1 as record number 6. So the count for case = 0029174 and loc = 01 should be 6 records.
Hope I explained it properly
Please treat this as urgent and help.
I have a table with the type of data as below,
sorted as follows, Case (ascending), Loc (ascending) and Transaction Date (ascending).
Code:
CASE LOC TRANSACTION DATE FACILITY 0029174 01 20061025 STORE-A 0029174 01 20061102 WAREHOUSE-1 0029174 01 20061124 WAREHOUSE-1 0029174 01 20061221 WAREHOUSE-1 0029174 01 20080414 STORE-B 0029174 01 20080506 WAREHOUSE-1 0029174 01 20080507 STORE-C 0029174 01 20080603 WAREHOUSE-1 0029174 01 20080706 WAREHOUSE-1
Hope I explained it properly
Please treat this as urgent and help.
Comment