Re: [GENERAL] Transposing rows and columns

2010-09-17 Thread Steve Clark
On 09/16/2010 05:26 PM, Aram Fingal wrote: On Sep 16, 2010, at 4:37 PM, John R Pierce wrote: On 09/16/10 10:44 AM, Aram Fingal wrote: I have thought about that but later on, when we do the full sized experiments, there will be too many rows for Excel to handle. if you insist on this

Re: [GENERAL] Transposing rows and columns

2010-09-17 Thread Aram Fingal
On Sep 17, 2010, at 9:00 AM, Steve Clark wrote: I think excel 2007 can handle more than 65,535 rows. You may be right. I'm actually using NeoOffice (Mac enhanced version of OpenOffice) and that can handle something like 1,048,000 rows.I wouldn't be surprised if newer versions of Excel

[GENERAL] Transposing rows and columns

2010-09-16 Thread Aram Fingal
I'm working with some people who live and breath Excel. I need to be able to move data back and forth between formats which make sense for Excel and for PostgreSQL. In some cases, this is just to accommodate what people are used to. In other cases, like statistical clustering, it's something

Re: [GENERAL] Transposing rows and columns

2010-09-16 Thread Uwe Schroeder
I'm working with some people who live and breath Excel. I need to be able to move data back and forth between formats which make sense for Excel and for PostgreSQL. In some cases, this is just to accommodate what people are used to. In other cases, like statistical clustering, it's

Re: [GENERAL] Transposing rows and columns

2010-09-16 Thread Sam Mason
On Thu, Sep 16, 2010 at 11:42:21AM -0400, Aram Fingal wrote: create table results( expt_no int references experiments(id), subject int references subjects(id), drug text references drugs(name), dose numeric, response numeric ) What's the primary key? I presume it's

Re: [GENERAL] Transposing rows and columns

2010-09-16 Thread Aram Fingal
On Sep 16, 2010, at 12:28 PM, Sam Mason wrote: On Thu, Sep 16, 2010 at 11:42:21AM -0400, Aram Fingal wrote: create table results( expt_no int references experiments(id), subject int references subjects(id), drug text references drugs(name), dose numeric, response numeric ) What's the

Re: [GENERAL] Transposing rows and columns

2010-09-16 Thread John R Pierce
On 09/16/10 10:44 AM, Aram Fingal wrote: I have thought about that but later on, when we do the full sized experiments, there will be too many rows for Excel to handle. if you insist on this transposing, won't that mean you'll end up with more columns than SQL can/should handle? -- Sent

Re: [GENERAL] Transposing rows and columns

2010-09-16 Thread Aram Fingal
On Sep 16, 2010, at 4:37 PM, John R Pierce wrote: On 09/16/10 10:44 AM, Aram Fingal wrote: I have thought about that but later on, when we do the full sized experiments, there will be too many rows for Excel to handle. if you insist on this transposing, won't that mean you'll end up with

Re: [GENERAL] Transposing rows and columns

2010-09-16 Thread Sam Mason
On Thu, Sep 16, 2010 at 01:44:30PM -0400, Aram Fingal wrote: On Sep 16, 2010, at 12:28 PM, Sam Mason wrote: If you want to do the transformation in SQL, you'd be writing something like: SELECT drug, dose MIN(CASE subject WHEN 1 THEN response END) AS resp_1, MIN(CASE subject