Hi, Need help on grouping. Running CR9 with SQL. I have a formula (@Shift) that determines if an event occurred on a particular shift based on a datediff of a from datetime to datetime. Basically (@Shift) for each record the formula will produce one of the following possiblities:
Record# @Shift
1 1/2/3
2 1/2
3 1
4 2
5 2/3
6 3
7 1/3
If possible I would like to duplicate records amongst the different groups. I have tried grouping with a specified order, where Possible Shift 1 is like *1*, Possible Shift 2 is like *2*, and Possible Shift 3 is like *3*, etc.
What I would like is to get is something like...
Possible Shift 1:
Record # 1
Record # 2
Record # 3
Record # 7
Possible Shift 2:
Record # 1
Record # 2
Record # 4
Record # 5
Possible Shift 3:
Record # 1
Record # 5
Record # 6
Record # 7
Thanks for any and all help.
Phil
Record# @Shift
1 1/2/3
2 1/2
3 1
4 2
5 2/3
6 3
7 1/3
If possible I would like to duplicate records amongst the different groups. I have tried grouping with a specified order, where Possible Shift 1 is like *1*, Possible Shift 2 is like *2*, and Possible Shift 3 is like *3*, etc.
What I would like is to get is something like...
Possible Shift 1:
Record # 1
Record # 2
Record # 3
Record # 7
Possible Shift 2:
Record # 1
Record # 2
Record # 4
Record # 5
Possible Shift 3:
Record # 1
Record # 5
Record # 6
Record # 7
Thanks for any and all help.
Phil