X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 607D7B438A1 for ; Mon, 7 Jul 2003 14:34:43 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 98400-03 for ; Mon, 7 Jul 2003 11:34:32 -0300 (ADT) Received: from anchor-post-39.mail.demon.net (anchor-post-39.mail.demon.net [194.217.242.80]) by svr1.postgresql.org (Postfix) with ESMTP id DA0D2B4388B for ; Mon, 7 Jul 2003 11:34:31 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) id 19ZX4O-0005qr-0U; Mon, 07 Jul 2003 15:34:21 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 9F21E179CD; Mon, 7 Jul 2003 15:34:19 +0100 (BST) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 0187716568; Mon, 7 Jul 2003 15:34:18 +0100 (BST) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: Gary Stainburn , pgsql-sql@postgresql.org Subject: Re: Concat and view - Re: create view error Date: Mon, 7 Jul 2003 15:34:20 +0100 User-Agent: KMail/1.4.3 References: <200307071240.23936.gary.stainburn@ringways.co.uk> <200307071336.35933.gary.stainburn@ringways.co.uk> <200307071401.38483.gary.stainburn@ringways.co.uk> In-Reply-To: <200307071401.38483.gary.stainburn@ringways.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200307071534.20970.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/65 X-Sequence-Number: 14179 On Monday 07 Jul 2003 2:12 pm, Gary Stainburn wrote: > > I've managed to get the view I wanted by using sub-selects - as shown > below, but I now have the 'lid' field showing in the resulting view three > times (as lid, lnid and lnaid). How can I remove lnid and lnaid from the > result? > > create view loco_dets as > select * from locos l > left outer join [snip] Don't do "select *" do "select field_a,field_b..." - the * doesn't just ref= er=20 to the locos table. --=20 Richard Huxton