Home » SQL & PL/SQL » SQL & PL/SQL » Condition in query
Condition in query [message #283661] Tue, 27 November 2007 21:30 Go to next message
florida
Messages: 82
Registered: April 2006
Member
I have this query in Access with a condition and would like to know how I can put the same condition part in Oracle 9i SQL?

SELECT 
b.FirstName, 
b.LastName, 
IIF( ISNULL(d.NOTES)=True,'Not Available',d.NOTES) AS NOTES
FROM 
...


How would this part(IIF( ISNULL(d.NOTES)=True,'Not Available',d.NOTES) AS NOTES) be done in an Oracle SQL?
Re: Condition in query [message #283662 is a reply to message #283661] Tue, 27 November 2007 21:35 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
by combining NVL & DECODE
Re: Condition in query [message #283664 is a reply to message #283662] Tue, 27 November 2007 21:49 Go to previous message
cmerry
Messages: 109
Registered: November 2005
Location: Idaho
Senior Member
The DECODE is not necessary to reproduce the results

NVL(d.Notes, 'Not Available')
Previous Topic: Date as column header and below result
Next Topic: Selecting unlocked rows?
Goto Forum:
  


Current Time: Fri Apr 26 23:32:56 CDT 2024