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 ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly