[GENERAL] Need sql to pull data from terribly architected table

2012-10-23 Thread Gauthier, Dave
Here's the deal... Instead of architecting and loading a table like... create teble foo (col1 text, col2 text, col3 text, col4 text, col5 text); insert into foo (col1,col2,col3,col4,col5) values ('c1',null,'c3','c4',null); They did this instead... create table foo (property text, value text); in

Re: [GENERAL] Need sql to pull data from terribly architected table

2012-10-23 Thread Chris Curvey
On Tue, Oct 23, 2012 at 2:52 PM, Gauthier, Dave wrote: > Here's the deal... > > ** ** > > Instead of architecting and loading a table like... > > create teble foo (col1 text, col2 text, col3 text, col4 text, col5 text); > > > insert into foo (col1,col2,col3,col4,col5) values > ('

Re: [GENERAL] Need sql to pull data from terribly architected table

2012-10-23 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gauthier, Dave Sent: Tuesday, October 23, 2012 2:53 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Need sql to pull data from terribly architected table Here's the deal... Inste

Re: [GENERAL] Need sql to pull data from terribly architected table

2012-10-23 Thread Gauthier, Dave
thier, Dave; pgsql-general@postgresql.org Subject: Re: [GENERAL] Need sql to pull data from terribly architected table On Tue, Oct 23, 2012 at 12:21 PM, Richard Broersma mailto:richard.broer...@gmail.com>> wrote: On Tue, Oct 23, 2012 at 12:06 PM, Chris Curvey mailto:ch...@chriscurvey.co

Re: [GENERAL] Need sql to pull data from terribly architected table

2012-10-23 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Richard Broersma Sent: Tuesday, October 23, 2012 3:24 PM To: ch...@chriscurvey.com Cc: Gauthier, Dave; pgsql-general@postgresql.org Subject: Re: [GENERAL] Need sql to pull data from terribly

Re: [GENERAL] Need sql to pull data from terribly architected table

2012-10-23 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gauthier, Dave Sent: Tuesday, October 23, 2012 3:31 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Need sql to pull data from terribly architected table Thanks for the answers. But I

Re: [GENERAL] Need sql to pull data from terribly architected table

2012-10-24 Thread Steve Litt
On Tue, 23 Oct 2012 18:52:52 +, Gauthier, Dave said: > Here's the deal... > > Instead of architecting and loading a table like... > create teble foo (col1 text, col2 text, col3 text, col4 text, col5 > text); insert into foo (col1,col2,col3,col4,col5) values > ('c1',null,'c3','c4',null); > > T

Re: [GENERAL] Need sql to pull data from terribly architected table

2012-10-24 Thread Chris Angelico
On Thu, Oct 25, 2012 at 2:42 AM, Steve Litt wrote: > Also, with the organization they're using, one can make new "columns" > on the fly. ... Anyway, the keypuncher is punching > data, comes across a brand new type of data (let's say "artist"), so > for this row the keypuncher puts in a key-value p

Re: [GENERAL] Need sql to pull data from terribly architected table

2012-10-24 Thread Steve Litt
On Thu, 25 Oct 2012 03:56:39 +1100, Chris Angelico said: > On Thu, Oct 25, 2012 at 2:42 AM, Steve Litt > wrote: > > Also, with the organization they're using, one can make new > > "columns" on the fly. ... Anyway, the keypuncher is punching > > data, comes across a brand new type of data (let's sa