db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John English <john.fore...@gmail.com>
Subject Re: AW: Pivoting tables?
Date Wed, 21 Nov 2012 14:46:52 GMT
On 21/11/2012 16:40, Malte.Kempff@de.equens.com wrote:
> Hi John,
> I think a smart SQL-Statement schould do.
> OK that would probably a bit inflxible, since you have a lot of changes concerning users
and products.
> But you could may be write a SQL-Generating routine that takes care of it.

I have to do that anyway since the query to diplay the table changes 
with the table layout, and all the temporary table stuff involves 
creating lots of SQL dynamically.

> I googled a bit and found examples (for other database-systems) but a bit modified it
should work also for derby.
> Maybe with derby's case expression it could work.
> Here an example function.
> [...snip...]
> Found in http://www.simple-talk.com/sql/t-sql-programming/creating-cross-tab-queries-and-pivot-tables-in-sql/

Thanks, it looks promising; I'll have a long think about this!
John English

View raw message