Re: crosstab help

From: Jayadevan <maymala(dot)jayadevan(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: crosstab help
Date: 2013-06-05 04:24:01
Message-ID: 1370406241472-5757977.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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
ent_attr_value from org_entity_attr_value order by 1') as ct(
row_name text,entity_attr_id bigint,ent_attr_value text )
and get an error -
ERROR: return and sql tuple descriptions are incompatible

--
View this message in context: http://postgresql.1045698.n5.nabble.com/crosstab-help-tp5511994p5757977.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message JORGE MALDONADO 2013-06-07 13:58:51 Advice with an insert query
Previous Message Robert DiFalco 2013-06-02 20:39:20 Correlated Update Query