Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id F16264ADAAC for ; Sat, 10 Dec 2011 13:30:44 -0400 (AST) Received: from mailout01.ims-firmen.de ([213.174.32.96]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RZQl1-0004xs-R8 for pgsql-sql@postgresql.org; Sat, 10 Dec 2011 17:30:45 +0000 Received: from mailin03.ims-firmen.de ([192.168.1.112]) by mailout01.ims-firmen.de with esmtp (envelope-from ) id 1RZQko-0008NE-6M for pgsql-sql@postgresql.org; Sat, 10 Dec 2011 18:30:30 +0100 Received: from [87.170.172.251] (helo=a-kretschmer.de) by mailin03.ims-firmen.de with esmtpsa (TLSv1:AES256-SHA:256) (envelope-from ) id 1RZQko-00060c-0n for pgsql-sql@postgresql.org; Sat, 10 Dec 2011 18:30:30 +0100 Received: from kretschmer by a-kretschmer.de with local (Exim 4.69) (envelope-from ) id 1RZQkn-0005hH-12 for pgsql-sql@postgresql.org; Sat, 10 Dec 2011 18:30:29 +0100 Date: Sat, 10 Dec 2011 18:30:29 +0100 From: Andreas Kretschmer To: pgsql-sql@postgresql.org Subject: Re: conditional FROM Message-ID: <20111210173029.GA21557@tux> References: <20111210170332479879.3df30525@klingler.net> <2BBB44CA-7EFA-4084-906F-6CB72AD28C6E@yahoo.com> <20111210182242043383.dc56d2c5@klingler.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20111210182242043383.dc56d2c5@klingler.net> X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: Mutt/1.5.18 (2008-05-17) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201112/41 X-Sequence-Number: 36102 Richard Klingler wrote: > This seems to do the trick... > > select arp.ip, arp.mac, arp.port2time, arp.time, arp.hostname, arp.vlan > from arp, port, node > where > arp.arp2port = port.portid and port.name = 'Fa1/0/1' > and port.port2node = node.nodeid > and node.name like 'nodename%' > union > select arp.ip, arp.mac, arp.port2time, arp.time, arp.hostname, arp.vlan > from arp, port, card, node > where > arp.arp2port = port.portid and port.name = 'Fa1/0/1' > and port.port2card = card.cardid > and card.card2node = node.nodeid > and node.name like 'nodename%' > ; > > Though I just can't order the rows anymore by inet(arp.ip) anymore... > Any hints on my ordering isn't anylonger possible? select * from (insert the query above here) foo order by ... Regards... Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknown) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°