MySQL Forums
Forum List  »  General

Re: Returning Unique Records
Posted by: Peter Brawley
Date: April 19, 2006 10:14AM

Would that be because the last receivables row for client 41 was 6 Nov 2005?

SELECT
r.recordID,
a.id,
a.start_date
FROM receivables r
INNER JOIN customer_ads a ON ( a.id = r.recordID )
WHERE a.client_id = 41
ORDER BY a.start_date DESC
LIMIT 1;
+------------+---------+------------+
| recordID | id | start_date |
+------------+---------+------------+
| 0000002505 | 0002505 | 2005-11-06 |
+------------+---------+------------+

BTW why do you quote integer values?

PB

Options: ReplyQuote


Subject
Written By
Posted
April 12, 2006 02:02PM
April 12, 2006 05:53PM
April 12, 2006 06:28PM
April 12, 2006 06:39PM
April 19, 2006 07:09AM
Re: Returning Unique Records
April 19, 2006 10:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.