Reply-To: "The Ghost" <The@Ghost.com>
From: "The Ghost" <The@Ghost.com>
Newsgroups: comp.databases.oracle.server
References: <9afe0b$bn1$1@unbe.sarenet.es>
Subject: Re: Conditional Select statement
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
Message-ID: <5aHy6.18908$XV.4868342@news3.rdc1.on.home.com>
Date: Wed, 04 Apr 2001 15:34:25 GMT
NNTP-Posting-Host: 24.156.176.182
X-Complaints-To: abuse@home.net
X-Trace: news3.rdc1.on.home.com 986398465 24.156.176.182 (Wed, 04 Apr 2001 08:34:25 PDT)
NNTP-Posting-Date: Wed, 04 Apr 2001 08:34:25 PDT
Organization: Excite@Home - The Leader in Broadband http://home.com/faster


select decode(field,'OK','this is the correct value','this is not the
correct_value')
from your_table


"Jon" <jzuazoa@nexo.es> wrote in message
news:9afe0b$bn1$1@unbe.sarenet.es...
> Hi,
>
> I would like to know if it is posible to add some conditional behaivour 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 that
 when
> the row contains 'OK' it would print 'this is the correct value' and on
 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...'
>
>



