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: Dave Matern <dmatern_at_dtiservices.com>
Date: 2000/05/12
Message-ID: <391c390a$1_3@news5.newsfeeds.com>#1/1

Hope this isn't too late, but...

You can use the DECODE and SIGN functions as follows (using your example):

SELECT NAME, DECODE(SIGN(POINTS-200),-1,"NO",0,"YES",1,"YES") FROM A Hope that helps!

Dave Matern
DotCom Technologies, Inc.

Julien Bellorgey wrote in message <8enjjh$1ra7$1_at_news4.isdnet.net>...
>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
>
>
>

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 80,000 Newsgroups - 16 Different Servers! =----- Received on Fri May 12 2000 - 00:00:00 CDT

Original text of this message

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