Zargo
Programmer
- Mar 21, 2005
- 109
Hi all,
I have two tables like:
Table1
indexnr
1001
1002
1003
1004
Table2
Indexnr | Datefield | Actionfield
1001 |09-20-2006 | 4000
1001 |09-21-2006 | 4001
1001 |09-22-2006 | 4008
1001 |09-23-2006 | 4050
1002 |09-20-2006 | 4001
1002 |09-21-2006 | 4050
1002 |09-22-2006 | 4060
I want to see al entries in table1 which has entries in table 2 (table1.index = table2.index) and the last record in table2 must have action 4050. So the result must be:
1001
It is a huge table so i have give an exmaple here.
TIA,
Zargo
I have two tables like:
Table1
indexnr
1001
1002
1003
1004
Table2
Indexnr | Datefield | Actionfield
1001 |09-20-2006 | 4000
1001 |09-21-2006 | 4001
1001 |09-22-2006 | 4008
1001 |09-23-2006 | 4050
1002 |09-20-2006 | 4001
1002 |09-21-2006 | 4050
1002 |09-22-2006 | 4060
I want to see al entries in table1 which has entries in table 2 (table1.index = table2.index) and the last record in table2 must have action 4050. So the result must be:
1001
It is a huge table so i have give an exmaple here.
TIA,
Zargo