Subject | Re: [firebird-support] Re: SQL question |
---|---|
Author | Martijn Tonies |
Post date | 2005-09-09T09:57:26Z |
> As you know, there is no row# limit about your group butDo note that none of these methods are generic, but will only cater
> 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
> GROUPSUM2,
> 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..
for your specific situation of 2 results.
With regards,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com