Subject Re: [firebird-support] Query Question... but, hard one
Author Tanz Anthrox
Peter,
How Can I combine these two Queries in only one.?

Can you write a SELECT definiton for this. I tried alot, so many trialsss

:) Sorry for outcome, I could not remember the opposite of income, hehe

----- Original Message -----
From: "Peter Faulks" <faulkdrv@...>
Newsgroups: egroups.ib-support
To: <firebird-support@yahoogroups.com>
Sent: Tuesday, November 11, 2003 11:49 PM
Subject: Re: [firebird-support] Query Question... but, hard one


> 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:
>
> > 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.
>
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>