Re: do I need a table function to do this

From: Bryan Lee Nuse <nuse(at)uga(dot)edu>
To: Kirk Wythers <kwythers(at)umn(dot)edu>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: do I need a table function to do this
Date: 2012-12-29 22:18:27
Message-ID: BA8E345938B48C42A2F124851A65C00B41C992D6@BL2PRD0210MB349.namprd02.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Kirk,

Is this even possible?

It looks like if you could "un-pivot" your t2, then you could do a join between that result and t1 and have your desired table. Others may be able to suggest a more direct solution, but I've successfully adapted the one given here, with my own wide-format tables:

https://cgsrv1.arrc.csiro.au/blog/2010/05/14/unpivotuncrosstab-in-postgresql/

Good luck,
Bryan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sim Zacks 2012-12-30 08:20:42 Re: do I need a table function to do this
Previous Message Serge Fonville 2012-12-29 22:06:18 Re: do I need a table function to do this?