crosstab - Mailing list pgsql-sql

From John Fabiani
Subject crosstab
Date
Msg-id 1374902.j7hCdyTH7B@linux-12
Whole thread Raw
Responses Re: crosstab  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-sql
Hi,
I don't know if it because I'm as sick as dog or I'm just a plain idiot - most 
likely a little of both.

Here is my table 

week_of date, 
item_number text,
planned_demand integer.

I have 
week_of        item_number      planned
2012-02-12    00005                200
2012-02-19    00005                -30
2012-02-26    00005                -16

I want to see

item_number   2012-02-12    2012-02-19   2012-02-26
00005                   200                 -30                 -16

I actually have added fields but that should get me started.

Thanks for help from an old man with a very bad cold.

Johnf


pgsql-sql by date:

Previous
From: rverghese
Date:
Subject: Re: map row in one table with random row in another table
Next
From: Pavel Stehule
Date:
Subject: Re: crosstab