On Wed, Sep 29, 2010 at 6:16 PM, Petite Abeille
<petite.abei...@gmail.com> wrote:
>
> On Sep 29, 2010, at 7:05 PM, Simon Slavin wrote:
>
>> SQL (not just SQLite) is traditionally terribly bad at doing matrix 
>> inversions.  What do you want to use the wide short table for ?  Does it 
>> really need to exist as a table ?
>
> Just for fun (and profit):
>
> http://www.orafaq.com/wiki/PIVOT
> http://www.orafaq.com/wiki/UNPIVOT

Ah, this is a pivot!!!  Doh.  And this [1] recipe shows how you can do
it in SQLite.  Thanks

[1] 
http://softwaresalariman.blogspot.com/2008/05/pivot-table-hack-in-sqlite3-and-mysql.html

I wonder if this is also more efficient....

To Simon, yes, we do *really* need the short wide structure but it
doesn't necessarily have to be a table (i.e. could be a view).  We do
need it to be a database object though because a subsequent step of
the process queries it.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to