On 25/01/2008, Phillip Smith <[EMAIL PROTECTED]> 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_alias in ('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
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings