[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lojban] Re: Urgent: SQL help for BPFK.



On Thursday 03 June 2004 21:20, Robin Lee Powell wrote:
> I have a table with message_id and in_reply_to.
>
> I need to select all rows that have an in_reply_to that is not equal to
> *any* message_id anywhere in the same table.
>
> This is MySQL, so I don't *think* I can use sub-selects.
>
> This is rather urgent, as it's breaking the BPFK boards.
>
> -Robin, who can never remember how to do this.

Never done this in one table, and most of my SQL experience is in Postgres, 
but it should be something like this:
select * from cartu as zunle left outer join cartu as pritu on 
zunle.in_reply_to=pritu.message_id where pritu.in_reply_to is null;

phma
-- 
li fi'u vu'u fi'u fi'u du li pa