Hello all.
Here are my Tables
Tickets
-------
id
Notes
-----
NoTicket
epoch
note
What I want i select all the tickets, but showing only the most recent
note to that ticket.
I have tried:
SELECT t1.id,t2.epoch,t2.note FROM Tickets t1 LEFT JOIN Notes t2 ON
t1.id = t2.NoTicket INNER JOIN Notes t3 ON t2.NoTicket = t3.NoTicket
HAVING t2.epoch = MAX(t3.epoch);
But it always give me an empty set.
I'm using mysql Ver 12.22 Distrib 4.0.20, for pc-linux (i686)
I'm sure i'm close to it, but can't find out.
Thx much in advance.
Denis St-Michel