Hi
I've got a main table called tblRiskMain with an identity column called intRiskIDcalled and a column called NextReview (type smalldatetime)
sample data
-----------
10, 01/01/2004
11, 01/01/2000
i have another table called tblStratReviews with
columns intStratID, intRiskID, ReviewDate
sample data
-----------
1, 10, 01/01/2005
2, 10, 01/01/2006
3, 10, 01/01/2007
4, 11, 01/01/2000
5, 11, 01/01/2003
6, 11, 01/01/2006
when a certain report runs I'd like it to loop through tblStratReviews where ReviewDate >= today's date and then update tblRiskMain with the first recod it finds so for record (intRiskID) 10 the new NewtReview will be 01/01/2006 and for record 11 the new NextReview will be 01/01/2006
thanks for your time
kim
I've got a main table called tblRiskMain with an identity column called intRiskIDcalled and a column called NextReview (type smalldatetime)
sample data
-----------
10, 01/01/2004
11, 01/01/2000
i have another table called tblStratReviews with
columns intStratID, intRiskID, ReviewDate
sample data
-----------
1, 10, 01/01/2005
2, 10, 01/01/2006
3, 10, 01/01/2007
4, 11, 01/01/2000
5, 11, 01/01/2003
6, 11, 01/01/2006
when a certain report runs I'd like it to loop through tblStratReviews where ReviewDate >= today's date and then update tblRiskMain with the first recod it finds so for record (intRiskID) 10 the new NewtReview will be 01/01/2006 and for record 11 the new NextReview will be 01/01/2006
thanks for your time
kim