From: | <tille(at)debian(dot)org> |
---|---|
To: | PostgreSQL SQL <pgsql-sql(at)postgresql(dot)org> |
Subject: | Turning column into row |
Date: | 2002-05-21 20:42:40 |
Message-ID: | Pine.LNX.4.33.0205212232120.4247-100000@energija.fam-tille.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hello,
I'm afraid this is a blody beginners question but I have no idea how
to perform a search sanely in the list archive.
I have a Table of certain items
create table item (
IdItem int,
Item varchar(64),
...
);
a lookuptable which defines some properties
create table property (
IdProperty int,
Property varchar(64)
);
and a table which defines the different properties which are possible for
a certain item:
create table tlkp_item_property (
IdItem int,
IdProperty int
);
So I can easily select all the properties of a certain item in a table
where the columns contain the properties. But I want to have an output
of the kind
Item 1: Property 1, Property 2, Property 3, ...
Item 2: <Properties of Item 2>
...
So I have to turn the different properties according to one item into
one field insead of one column.
How to do this sanely?
Kind regards
Andreas.
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2002-05-22 02:59:29 | Re: drop constraint problem |
Previous Message | Josh Berkus | 2002-05-21 16:30:08 | Re: A proposal for Interval Math |