Subject Re: [firebird-support] Re: SQL question
Author Martijn Tonies
> As you know, there is no row# limit about your group but
> tables and selects have column# limit.
> Anyway,
> You can turn your rows 90 degree with some ways if u sure about
> group limit..
> Select
> (select First 1 ty,sum(amount) from test group by ty) as GROUPSUM1,
> (select First 1 skip 1 ty,sum(amount) from test group by ty) as
> from rdb$database
> ( i didn't test it but worked theorically in my untheareded single
> proccessed brain ;) )
> or you can write a selectable stored procedure and suspend
> rows as columns..

Do note that none of these methods are generic, but will only cater
for your specific situation of 2 results.

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Upscene Productions
Database development questions? Check the forum!