I need help! I work with Crystal reports XI and usually manage just fine with the Formula editor but his one I think will require some SQL and I am not good at that.
We are running SQL 2000 I think (Enterprise Manager 8.0) Our sales people schedule activities and enter notes for customer accounts. Each is stored in a separate table. I need to find activities that are scheduled 240 days into the future and show the most recent note that goes with the account for which that activity is scheduled.
The two tables, Activities and History, share the an accountID field in common that links them to the correct customer account. I want to look at dates in the Startdate.Activities field more than 240 days in the future and show the most recent note from the History table where the accountid's match.
I figure my query will contain a join on AccountID.Activities and AccountID.History used with Max(completedate.History) but I do not understand how to word it.
I would like to perform all this in crystal if possible. I humbly request your help.
We are running SQL 2000 I think (Enterprise Manager 8.0) Our sales people schedule activities and enter notes for customer accounts. Each is stored in a separate table. I need to find activities that are scheduled 240 days into the future and show the most recent note that goes with the account for which that activity is scheduled.
The two tables, Activities and History, share the an accountID field in common that links them to the correct customer account. I want to look at dates in the Startdate.Activities field more than 240 days in the future and show the most recent note from the History table where the accountid's match.
I figure my query will contain a join on AccountID.Activities and AccountID.History used with Max(completedate.History) but I do not understand how to word it.
I would like to perform all this in crystal if possible. I humbly request your help.