Subject | Re: [firebird-support] Query Question... but, hard one |
---|---|
Author | Peter Faulks |
Post date | 2003-11-11T21:50:21Z |
G'day,
I reckon you should be using the client application to to the formating -
So do two seperate queries -
SELECT ... FROM table WHERE type = 'Outcome';
populate the first two columns
then do the second query -
SELECT ... FROM table WHERE type = 'Income';
and populate the 3rd and fourth columns
BTW not meaning to be picky but, "Outcome" is not the correct term - it
should be "Outgoing" or "Expenses"
Regards
On Tue, 11 Nov 2003 14:15:38 +0200 "Tanz Anthrox"
<tanz_anthrox@...> wrote:
I reckon you should be using the client application to to the formating -
So do two seperate queries -
SELECT ... FROM table WHERE type = 'Outcome';
populate the first two columns
then do the second query -
SELECT ... FROM table WHERE type = 'Income';
and populate the 3rd and fourth columns
BTW not meaning to be picky but, "Outcome" is not the correct term - it
should be "Outgoing" or "Expenses"
Regards
On Tue, 11 Nov 2003 14:15:38 +0200 "Tanz Anthrox"
<tanz_anthrox@...> wrote:
> Hi,
>
> I have an example and I could not find a solution for this
>
> Table
>
> Name Type Amount
> Food Outcome 500
> Salary Income 2500
> Clothes Outcome 50
> Rental Income 300
> Car Outcome 80
> Oil Outcome 50
> .
> .
> .
>
>
> and I need a result set for this like,
>
> Name Amount Name Amount
> Food 500 Salary 2500
> Clothes 50 Rental 300
> Car 80 null null
> Oil 50 null null
>
>
> 2 column for Outcome and 2 column for income,
>
> Pls, Becareful outcome count and income count may be different.