Home » SQL & PL/SQL » SQL & PL/SQL » NULLIF (Oracle 9i)
NULLIF [message #399557] Thu, 23 April 2009 00:21 Go to next message
ramesh55.sse
Messages: 262
Registered: December 2008
Location: Hyderabad
Senior Member

SQL>SELECT NULLIF(comm,NULL) from emp;

NULLIF(COMM,NULL)
-------------------------------

300
500

1400




0


NULLIF(COMM,NULL)
-----------------




14 rows selected.

SQL> select NULLIF(NULL,comm) from emp
*
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected - got CHAR

Why it's returning error.
Re: NULLIF [message #399567 is a reply to message #399557] Thu, 23 April 2009 00:48 Go to previous message
Michel Cadot
Messages: 65082
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
A useful link for you: SQL Reference.

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Previous Topic: partition by rownum - clarify
Next Topic: Database Link Insert with Function
Goto Forum:
  


Current Time: Fri Jul 21 10:03:45 CDT 2017

Total time taken to generate the page: 0.07747 seconds