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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Condition in SQL

Re: Condition in SQL

From: <sybrandb_at_hccnet.nl>
Date: Sun, 02 Dec 2007 17:03:48 +0100
Message-ID: <hpl5l35flde6qhas6ukcvm524q8jhaor91@4ax.com>


On Tue, 27 Nov 2007 19:35:41 -0800 (PST), francan00_at_yahoo.com wrote:

>I have this query with a condition in Access and would like to know
>how I can put a condition part in Oracle 9i SQL similiar to how Access
>does it?
>
>
>Current Access SQL that I want to rewrite in Oracle where I just need
>to know how to do the condtion part: IIF( ISNULL(d.NOTES)=True,'Not
>Available',d.NOTES) AS NOTES
>
>
>SELECT
>b.FirstName,
>b.LastName,
>c.FirstName,
>c.LastName,
>a.Info,
>IIF( ISNULL(d.NOTES)=True,'Not Available',d.NOTES) AS NOTES
>FROM
>Person AS b,
>Person AS c,
>Notes AS d,
>Main AS a
>WHERE
>a.MID= 34
>And
>b.PID=a.PO
>And
>c.PID=a.TE
>And
>d.MID=a.MID

nvl(d.notes, 'Not available')

You can find all functions in the SQL reference manual.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Sun Dec 02 2007 - 10:03:48 CST

Original text of this message

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