Re: [SQL] crosstab

2012-03-12 Thread Pavel Stehule
2012/3/12 John Fabiani : > select * > from crosstab('select  item_number::text, week_of::date, planned_demand::text > from holding_table order by 1,2') > as ct(row_name text, week_of date, planned text) > > The above does not work.  What am I doing wrong? what it does? do you have tablefunc exten

Re: [SQL] crosstab

2012-03-12 Thread John Fabiani
select * from crosstab('select item_number::text, week_of::date, planned_demand::text from holding_table order by 1,2') as ct(row_name text, week_of date, planned text) The above does not work. What am I doing wrong? Johnf On Monday, March 12, 2012 06:01:21 PM Pavel Stehule wrote: > Hello > >

Re: [SQL] crosstab

2012-03-12 Thread Pavel Stehule
Hello maybe this article helps http://stackoverflow.com/questions/3002499/postgresql-crosstab-query there are more ways Regards Pavel Stehule 2012/3/12 John Fabiani : > 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

[SQL] crosstab

2012-03-12 Thread John Fabiani
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_ofitem_number planned 2012-02-125200 2012-02-195