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 -> If clause in SELECT statements

If clause in SELECT statements

From: Tim Gifford <tgifford_at_horizonstech.com>
Date: 2000/07/18
Message-ID: <3974b59c@news.raccoon.com>#1/1

Is there any way to evaluate a field in a SELECT query w/o writting a User Function? This is an example of the logic that I would like to have in a view:

    select if([state]='NY','New York',[state]) as state_desc from state_tab

If the state column is NY then it would output New York, otherwise, it would return the value from the field.

Any Ideas,
Tim Gifford
tgifford(at)horizonstech.com Received on Tue Jul 18 2000 - 00:00:00 CDT

Original text of this message

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