X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 7572D11F6282 for ; Wed, 29 Mar 2006 21:23:55 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89800-08 for ; Wed, 29 Mar 2006 21:23:53 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by postgresql.org (Postfix) with ESMTP id 9392611F66AC for ; Wed, 29 Mar 2006 21:23:51 -0400 (AST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 8BD5A350D5; Wed, 29 Mar 2006 17:23:51 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 88A68350D4; Wed, 29 Mar 2006 17:23:51 -0800 (PST) Date: Wed, 29 Mar 2006 17:23:51 -0800 (PST) From: Stephan Szabo To: Hrishikesh Deshmukh Cc: pgsql-sql@postgresql.org Subject: Re: results being col wise rather than row wise In-Reply-To: <829d7fb60603291708k3449ce68j22ce498d05868e99@mail.gmail.com> Message-ID: <20060329171920.U99150@megazone.bigpanda.com> References: <829d7fb60603291708k3449ce68j22ce498d05868e99@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.139 required=5 tests=[AWL=0.139] X-Spam-Score: 0.139 X-Spam-Level: X-Archive-Number: 200603/458 X-Sequence-Number: 24804 On Wed, 29 Mar 2006, Hrishikesh Deshmukh wrote: > HI All, > > I have 5 tables which have different columns as shown below, each table has > a different case column, > i want to retrieve sample related information as follows: > > pid | xindex | yindex | height Index | flag | case1 | case 2.....etc > > But i get this queer result: > pid | xindex | yindex | Height Index | flag | case > -------------+--------+--------+-------------+-------------+--------- > 102234 | 411 | 271 | 9 | 1 | 80 > 102234 | 411 | 271 | 9 | 1 | 83 > 102234 | 411 | 271 | 9 | 1 | 87 > 102234 | 411 | 271 | 9 | 1 | 101 > 102234 | 411 | 271 | 9 | 1 | 129 > 102234 | 411 | 271 | 9 | 1 | 91 > 102234 | 411 | 271 | 9 | 1 | 120.3 > > Why is the result in a column wise rather than row wise???!!!! > Could somebody explain why the redundancy with respect to pi, xindex, > yindex, height index, flag but the CORRECT values for the cases but not in > the order expected!!! Can you give us the specific schema and query you used? We're only going to be guessing otherwise.