Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Condition in SQL
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
Look at the NVL and NVL2 functions.
www.psoug.org
click on Morgan's Library
click on Built-in functions near the top of the page.
-- Daniel A. Morgan Oracle Ace Director & Instructor University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Tue Nov 27 2007 - 22:03:44 CST
![]() |
![]() |