Create a query that displays the employees' last names and commision amounts.If an employee does not earn commmission, put "No Commission." Label the column COMM.
select nvl(to_char(commision),'no commision') "COMM" from jemployee2;
Neeraj
Nov 7th, 2006
Hi,Suppose that you have a table EMP with the following structure.emp_id number(5)f_name varchar2(30)l_name varchar2(30)salary number(8,2)comm number(8,2) /* this column holds the commission values*/Now you can write your query as follows.SELECT l_name, nvl(comm,'No Commission') commission from EMP;The above query will give the desired output.
karthik
Jan 2nd, 2007
Check it out with this Query,select ename,decode(comm,NULL,'NO COMMISSION',comm,comm) from emp;
Create a query that displays the employees' last names and commision amounts.If an employee does not earn commmission, put "No Commission." Label the column COMM.
Profile Answers by zecar Questions by zecar
Questions by zecar answers by zecar