results being col wise rather than row wise

From: "Hrishikesh Deshmukh" <hdeshmuk(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: results being col wise rather than row wise
Date: 2006-03-30 01:08:51
Message-ID: 829d7fb60603291708k3449ce68j22ce498d05868e99@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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!!!

Thanks,
Hrishi

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2006-03-30 01:23:51 Re: results being col wise rather than row wise
Previous Message Niklas Johansson 2006-03-29 23:49:18 Re: Ugly group by problem