Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Condition in SQL
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 DBAReceived on Sun Dec 02 2007 - 10:03:48 CST
![]() |
![]() |