Re: query or design question
От | Richard Huxton |
---|---|
Тема | Re: query or design question |
Дата | |
Msg-id | 200310201812.49869.dev@archonet.com обсуждение исходный текст |
Ответ на | query or design question (Adam Witney <awitney@sghms.ac.uk>) |
Список | 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
В списке pgsql-sql по дате отправления: