Re: [GENERAL] Generating subtotal reports direct from SQL

2007-10-10 Thread Owen Hartnett
At 1:32 AM +0100 10/10/07, Gregory Stark wrote: "Owen Hartnett" <[EMAIL PROTECTED]> writes: Such that the final table has additional subtotal rows with the aggregate sum of the amounts. I'm thinking I can generate two tables and merge them, but is there an easier way using a fancy Select

Re: [GENERAL] Generating subtotal reports direct from SQL

2007-10-09 Thread Gregory Stark
"Owen Hartnett" <[EMAIL PROTECTED]> writes: > Such that the final table has additional subtotal rows with the aggregate sum > of the amounts. I'm thinking I can generate two tables and merge them, but is > there an easier way using a fancy Select statement? Unfortunately the fancy SQL feature yo

Re: [GENERAL] Generating subtotal reports direct from SQL

2007-10-09 Thread Erik Jones
On Oct 9, 2007, at 4:53 PM, Owen Hartnett wrote: I'm hoping there's a real easy way of doing this that I'm just missing: Given a Select statement such as: Select ID, code, amount from foo where code < 10; that gives me a table like this: ID codeamount ___

[GENERAL] Generating subtotal reports direct from SQL

2007-10-09 Thread Owen Hartnett
I'm hoping there's a real easy way of doing this that I'm just missing: Given a Select statement such as: Select ID, code, amount from foo where code < 10; that gives me a table like this: ID codeamount _ 1 4 20 2