Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7702h691239 for ; Mon, 6 Aug 2001 20:02:43 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 97725; Mon, 06 Aug 2001 17:02:39 -0700 From: "Josh Berkus" Subject: Re: views and null bothering To: =?ISO-8859-1?Q?Mart=EDn_Marqu=E9s?= , pgsql sql Mailing List X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Mon, 06 Aug 2001 17:02:39 -0700 Message-ID: In-Reply-To: <01080620362304.00347@bugs> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200108/77 X-Sequence-Number: 4298 Martin, > I have a bunch of tables which I give access through a view. The > problem is > that in the main table there are columns, that are referenced to > another > tables column, that have NULLs. > In the SELECT inside the view's definition I put the join equality, > but have > lots of trouble makeing it put correctly the columns that have NULL > values. You need to use LEFT OUTER JOIN, supported in Postgres 7.1.x. See the current postgresql docs, or your favorite ANSI-SQL handbook, for guidance. -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco