On 25/01/2008, Phillip Smith <phillip.smith@weatherbeeta.com.au> wrote:
> Absolutely clear as mud :P
sorry ... I'm not too good with expressing my SQL needs, I'm afraid,
Thanks for trying :}
In the end I got it sorted with the following
select dm.docnum, dm.alias1, dm.docname, dm.alias2 as "Status", dm2.alias2 as "Reply"
from docmaster as dm
left outer join ( select alias1, subclass_alias, alias2, entrywhen from docmaster where
subclass_aliasin ('Reply','MinTR') and alias2 in ('PENDING','COMPLETED') ) as dm2
on dm2.alias1 = dm.alias1
where dm.subclass_alias='Post' and alias2 in ('PENDING','REDRAFT');
Cheers,
Andrej
--
Please don't top post, and don't use HTML e-Mail :} Make your quotes concise.
http://www.american.edu/econ/notes/htmlmail.htm