Hello All,
I have two tables:
tbl_clients:
- clients_id (PK)
- clients_name
- comments_id (FK)
tbl_comments:
- comments_id (PK)
- comments_text
- comments_date
What I need to do is join these two tables together, but here's the twist...I only want the MOST RECENT comment in the table.
i.e.
- I want all the clients in the end table regardless of whether they have comments or not.
- I only want one record per client.
- If there is mulitple comments for a client, I only want the most recent in the results table.
Is this possible?! It's doing my head in.
Thanks a lot
I have two tables:
tbl_clients:
- clients_id (PK)
- clients_name
- comments_id (FK)
tbl_comments:
- comments_id (PK)
- comments_text
- comments_date
What I need to do is join these two tables together, but here's the twist...I only want the MOST RECENT comment in the table.
i.e.
- I want all the clients in the end table regardless of whether they have comments or not.
- I only want one record per client.
- If there is mulitple comments for a client, I only want the most recent in the results table.
Is this possible?! It's doing my head in.
Thanks a lot