| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Conditional Select statement
In Oracle 8i, you can write:
select case
when value = 'OK' then 'this is the correct value'
when value = 'FAIL' then 'this is not the correct value'
else 'unknown value'
end
Marc
>>>>>>>>>>>>>>>>>> Oorspronkelijk bericht <<<<<<<<<<<<<<<<<<
Op 2001-04-04, 17:25:44, schreef "Jon" <jzuazoa_at_nexo.es> over het thema
Conditional Select statement:
> Hi,
> I would like to know if it is posible to add some conditional behaivou
r
to a
> select statement. I mean that if have a table that contains sometimes
the
> 'OK' value and 'FAIL' for other rows so I could create a statement tha
t
when
> the row contains 'OK' it would print 'this is the correct value' and o
n
the
> other hand when it contains 'FAIL' it just prints 'this is not the
correct
> value'
> Thanks for you help
> PS. this task is accomplish in SYBASE using 'CASE WHEN...'
Received on Thu Apr 05 2001 - 00:35:36 CDT
![]() |
![]() |