E
escuro19 via AccessMonster.com
Hi,
I spend alot of time trying to work this out but failed so please could
someone help.
Data:
(this table the intday varies depending on the person)
Table1
Person | intDay
1 | 22
1 | 23
1 | 24
1 | 25
2 | 14
2 | 15
2 | 16
2 | 17
Table2
(this data is fixed, its like a scale)
Table2
+day | -day
8 | -7
9 | -6
10 | -5
11 | -4
12 | -3
13 | -2
15 | -1
n | n
This is what i want the output to be:
Person | intDay | +day | -day
1 | 22 | 8 | -7
1 | 23 | 9 | -6
1 | 24 |10 | -5
1 | 25 | 11 | -4
2 | 14 | 8 | -7
2 | 15 | 9 | -6
2 | 16 | 10 | -5
2 | 17 |11 | -4
So basically matching table1 with table2, but for each person the table2
matches resets. And also is it possible to stop matching once the Person's
intday stops.
Thankyou for your help
I spend alot of time trying to work this out but failed so please could
someone help.
Data:
(this table the intday varies depending on the person)
Table1
Person | intDay
1 | 22
1 | 23
1 | 24
1 | 25
2 | 14
2 | 15
2 | 16
2 | 17
Table2
(this data is fixed, its like a scale)
Table2
+day | -day
8 | -7
9 | -6
10 | -5
11 | -4
12 | -3
13 | -2
15 | -1
n | n
This is what i want the output to be:
Person | intDay | +day | -day
1 | 22 | 8 | -7
1 | 23 | 9 | -6
1 | 24 |10 | -5
1 | 25 | 11 | -4
2 | 14 | 8 | -7
2 | 15 | 9 | -6
2 | 16 | 10 | -5
2 | 17 |11 | -4
So basically matching table1 with table2, but for each person the table2
matches resets. And also is it possible to stop matching once the Person's
intday stops.
Thankyou for your help