Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Need Help for an intelligent query

Re: Need Help for an intelligent query

From: Randy DeWoolfson <randy_at_euclidsys.com>
Date: 2000/05/09
Message-ID: <39184C0E.2A9C7D5@euclidsys.com>#1/1

maybe try this: (sorry I didnt run it through SQL just my impression...)

SELECT a.name, 'No' FROM TABLEA a WHERE points < 200 UNION
SELECT b.name, 'Yes' FROM TABLEA b WHERE points >= 200 ORDER BY 1 hth
Randy

Julien Bellorgey wrote:

> Hello,
>
> Maybe this question will seem too easy to answer, but is there a way to
> create a query that can generate values depending on the values of other
> fields (an example is provided).
> I know how to do it with Access, but I do not know with Oracle 7.
> Thank you very much if somebody can help me.
>
> Regards,
>
> Julien
>
> -------------------------------------
> For example:
>
> Table A
>
> Name, Age, Points
> Jim 25 150
> Joe 20 300
> Scott 30 500
>
> For each person, the query must indicate if the points are more than 200 or
> not.
> The result of the query must be :
>
> Jim No
> Joe Yes
> Scott Yes
Received on Tue May 09 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US