Posted by Hilarion on 11/16/05 14:25
> select id, name, oid is NOT null as status from tab_things p
> left join object_things o on o.oid = 1 and o.thid = p.id
Where does "id" come from? If it's "thid", then you should
use "p.thid" ("thid" is defined in both used tables, so
you have to decide which one to use).
Also your solution (without aggregation) will return more
than one row for one "thid" when there's more than one
row for it in the "object_things" table.
Hilarion
[Back to original message]
|