Re: [SQL] Extract interdependent info from one table

2008-01-25 Thread Andrej Ricnik-Bay
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",

Re: [SQL] Extract interdependent info from one table

2008-01-24 Thread Phillip Smith
> docnum | alias1 | alias2 | subclass_alias > ++-+ > 653219 | 3587 | Redraft | Reply > (1 row) > > What I'd really like is to BOTH Post AND reply, with the alias2 for both. > Hope this was as clear as mud? :) Absolutely clear as mud :P I think this mi

[SQL] Extract interdependent info from one table

2008-01-24 Thread Andrej Ricnik-Bay
Hi Guys, I can't quite wrap my head around this one ... I have \d docmaster Table "public.docmaster" Column | Type | Modifiers ++--- alias1 | integer| alias2 | character varyi