Re: [SQL] crosstab help

2013-06-04 Thread Jayadevan
Hello all , I have a similar situation - an EAV table. entity_attr_id integer entity_id bigint ent_attr_value character varying I am trying select * from crosstab('select entity_id::text as row_name, entity_attr_id::bigint as entity_attr_id , ent_attr_value::text as

Re: [SQL] crosstab help

2012-02-24 Thread John Fabiani
sprüngliche Nachricht- > Von: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] > Im Auftrag von John Fabiani Gesendet: Freitag, 24. Februar 2012 09:39 > An: pgsql-sql@postgresql.org > Betreff: Re: [SQL] crosstab help > > That worked! However, I need the actual

Re: [SQL] crosstab help

2012-02-24 Thread Andreas Gaab
Gesendet: Freitag, 24. Februar 2012 09:39 An: pgsql-sql@postgresql.org Betreff: Re: [SQL] crosstab help That worked! However, I need the actual date to be the column heading? And of course the dates change depending on the date passed to the function: xchromasun._chromasun_totals(now()::date

Re: [SQL] crosstab help

2012-02-24 Thread John Fabiani
> Von: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] > Im Auftrag von John Fabiani Gesendet: Freitag, 24. Februar 2012 09:11 > An: pgsql-sql@postgresql.org > Betreff: [SQL] crosstab help > > I have a simple table > item_number week_of

Re: [SQL] crosstab help

2012-02-24 Thread Andreas Gaab
Gesendet: Freitag, 24. Februar 2012 09:11 An: pgsql-sql@postgresql.org Betreff: [SQL] crosstab help I have a simple table item_number week_of planned_qoh -- -- -- 5 2012-02-05 30 5

[SQL] crosstab help

2012-02-24 Thread John Fabiani
I have a simple table item_number week_of planned_qoh -- -- -- 5 2012-02-05 30 5 2012-02-12 40 5 2012-02-19 50 where item_number text week_of date planned