Tanner Postert wrote:
> I actually solved my own problem...
>
> SELECT t1.item_id, t1.dt, t1.text ,t3.*
> FROM table AS t1, table3 as t3
> LEFT JOIN table AS t2 ON t1.item_id = t2.item_id AND t1.dt < t2.dt
> WHERE t2.item_id IS NULL;
>
> becomes
>
> SELECT t1.item_id, t1.dt, t1.text
> FROM (table AS t1, table3 as t3)
> LEFT JOIN table AS t2 ON t1.item_id = t2.item_id AND t1.dt < t2.dt
> WHERE t2.item_id IS NULL;
>
> amazing what a little set of parenthesis will do. thanks anyways.
>
>
>
>
t3 is not joined at all.
Re-write this using inner joins to see your problem.
SELECT t1.item_id, t1.dt, t1.text
FROM table AS t1 INNER JOIN table3 AS t3 ON ???????
LEFT JOIN table AS t2 ON t1.item_id = t2.item_id AND t1.dt < t2.dt
WHERE t2.item_id IS NULL;
--
Gerald L. Clark
Supplier Systems Corporation