Goalie3533
Programmer
Hi guys. I apologize if this sounds a little confusing but unfortunately, I'm not a database expert and I really need some help on this issue.
I need to retrieve about a dozen fields from various tables for a report that prints out our clients service plans however I'm not sure how to go about successfully grabbing this particular data.
I need to grab items such as the client name, client phone #, email, the name of the clients service plan, and things of that nature. The problem is the final item I need to grab which is the date the service plan ends.
The situation is there are a few clients of ours who for whatever reason, have service plans from last year who do not yet have new plans implemented for this year yet. Now, just because they don't have a plan for this year doesn't mean they're no longer clients of ours so I need to have these guys show up on the report as well. So these guys have service plans that ended in 2003.
Now here's the tricky part, all service plans for all clients for every year we've been in business is on the database. So my problem is I can't select all service plans or I'll get all of these old ones as well but I also can't select only the service plans that are for this year because as I mentioned above, some may have ended in 2003.
So the way the report needs to go is I need to select all of the fields I mentioned above and when it comes to selecting the service plan end date, I need to select the LATEST one for that particular client.
Any idea on how to go about doing this?
Thanks in advance.
-Goalie35
I need to retrieve about a dozen fields from various tables for a report that prints out our clients service plans however I'm not sure how to go about successfully grabbing this particular data.
I need to grab items such as the client name, client phone #, email, the name of the clients service plan, and things of that nature. The problem is the final item I need to grab which is the date the service plan ends.
The situation is there are a few clients of ours who for whatever reason, have service plans from last year who do not yet have new plans implemented for this year yet. Now, just because they don't have a plan for this year doesn't mean they're no longer clients of ours so I need to have these guys show up on the report as well. So these guys have service plans that ended in 2003.
Now here's the tricky part, all service plans for all clients for every year we've been in business is on the database. So my problem is I can't select all service plans or I'll get all of these old ones as well but I also can't select only the service plans that are for this year because as I mentioned above, some may have ended in 2003.
So the way the report needs to go is I need to select all of the fields I mentioned above and when it comes to selecting the service plan end date, I need to select the LATEST one for that particular client.
Any idea on how to go about doing this?
Thanks in advance.
-Goalie35