From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Adam Witney <awitney(at)sghms(dot)ac(dot)uk>, pgsql-sql <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: query or design question |
Date: | 2003-10-20 17:12:49 |
Message-ID: | 200310201812.49869.dev@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Monday 20 October 2003 11:58, Adam Witney wrote:
> Hi,
>
> I have a table like so
>
> CREATE TABLE imagene (
> id int
> bioassay_id int
> gene_id text
> s_row int
> s_column int
> s_meta_row int
> s_meta_column int
> sig_median numeric
> bkg_median numeric
> );
> And I need to generate an output like this......
>
> bioassay_id=106 bioassay_id=107
> ---------------------- ----------------------
> gene_id, sig_median, bkg_median, sig_median, bkg_median
> I am not sure if a crosstab function will do this?
There are some examples in contrib/tablefunc that might well be useful for
you. You should also check out the "Set Returning Functions" article on
http://techdocs.postgresql.org/
If you find your requirements getting particularly complex, I'd be tempted to
do the hard work in the application.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | weigelt | 2003-10-20 17:18:17 | Re: [postgres] PostgreSQL-DB auf Web-Schnittstelle bringen |
Previous Message | Richard Huxton | 2003-10-20 17:09:51 | Re: Which is faster SQL or PL/PGSQL |