top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How do I write the query?

0 votes
340 views

Display the records between two range I know the nvl function only allows the same data type(ie. number or char or date Nvl(comm, 0)), if commission is null then the text “Not Applicable” want to display, instead of blank space. How do I write the query?

posted Aug 11, 2015 by Vidhya Sagar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

You can use the decode function for the above requirement. Please find the query as below:

 Ex: select ename,DECODE(NVL(comm,0),0,'Not Applicable',comm) from scott.emp; 
answer Aug 12, 2015 by Arun Gowda
...