From lojban-out@lojban.org Thu Jun 03 19:17:51 2004 Return-Path: X-Sender: lojban-out@lojban.org X-Apparently-To: lojban@yahoogroups.com Received: (qmail 54223 invoked from network); 4 Jun 2004 02:17:51 -0000 Received: from unknown (66.218.66.218) by m24.grp.scd.yahoo.com with QMQP; 4 Jun 2004 02:17:51 -0000 Received: from unknown (HELO chain.digitalkingdom.org) (64.81.49.134) by mta3.grp.scd.yahoo.com with SMTP; 4 Jun 2004 02:17:50 -0000 Received: from lojban-out by chain.digitalkingdom.org with local (Exim 4.32) id 1BW4Fi-00033J-EJ for lojban@yahoogroups.com; Thu, 03 Jun 2004 19:16:14 -0700 Received: from dsl081-049-134.sfo1.dsl.speakeasy.net ([64.81.49.134] helo=chain.digitalkingdom.org) by chain.digitalkingdom.org with esmtp (Exim 4.32) id 1BW4F7-00032q-Ah; Thu, 03 Jun 2004 19:15:37 -0700 Received: with ECARTIS (v1.0.0; list lojban-list); Thu, 03 Jun 2004 19:15:32 -0700 (PDT) Received: from rlpowell by chain.digitalkingdom.org with local (Exim 4.32) id 1BW4Em-00032e-Bb for lojban-list@lojban.org; Thu, 03 Jun 2004 19:15:16 -0700 Date: Thu, 3 Jun 2004 19:15:16 -0700 Message-ID: <20040604021516.GF26987@chain.digitalkingdom.org> Mail-Followup-To: lojban-list@lojban.org References: <20040604012056.GE26987@chain.digitalkingdom.org> <200406032203.04635.phma@phma.hn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200406032203.04635.phma@phma.hn.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 8044 X-ecartis-version: Ecartis v1.0.0 Sender: lojban-list-bounce@lojban.org Errors-to: lojban-list-bounce@lojban.org X-original-sender: rlpowell@digitalkingdom.org X-list: lojban-list To: lojban@yahoogroups.com X-eGroups-Remote-IP: 64.81.49.134 X-eGroups-From: Robin Lee Powell From: Robin Lee Powell Reply-To: rlpowell@digitalkingdom.org Subject: [lojban] Re: Urgent: SQL help for BPFK. X-Yahoo-Group-Post: member; u=116389790 X-Yahoo-Profile: lojban_out X-Yahoo-Message-Num: 22495 On Thu, Jun 03, 2004 at 10:03:04PM -0400, Pierre Abbat wrote: > 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. > > 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; Yep. Thanks. select distinct tk1.in_reply_to from tiki_comments tk1 left outer join tiki_comments tk2 on tk1.in_reply_to = tk2.message_id where tk2.message_id is null; This only partly solves the problem, unfortunately, because I need to wedge it into a larger expression, but I think I can work it out. BTW, once the boards are working again (which should be momentarily), you owe the group responses. -Robin -- http://www.digitalkingdom.org/~rlpowell/ *** I'm a *male* Robin. "Many philosophical problems are caused by such things as the simple inability to shut up." -- David Stove, liberally paraphrased. http://www.lojban.org/ *** loi pimlu na srana .i ti rokci morsi