basic help [message #353364] |
Mon, 13 October 2008 10:39 |
ravi25k
Messages: 2 Registered: October 2008
|
Junior Member |
|
|
i am a 12 grade student and my teacher gave me 50 query as home work and i am not able to solve 2 query on default emp table. hope you guys will help me.
1)list the employee name and commission and if the employee dous not earn commission put "no commission" label the column comm.
2)list the employee name,hiredate and salary review date, which is the first Monday after six months of service. label the column REVIEW. Format the dates to appear in the format similar to Sunday. The seventh of September 1981.
|
|
|
|
Re: basic help [message #354437 is a reply to message #353364] |
Sat, 18 October 2008 22:56 |
ravi25k
Messages: 2 Registered: October 2008
|
Junior Member |
|
|
how do i get default values for already existing comm value along with no commission, without specifying individual values?
SQL> select ename,decode(comm, NULL,'no commission') from emp
ENAME DECODE(COMM,N
---------- -------------
SMITH no commission
ALLEN
WARD
JONES no commission
MARTIN
BLAKE no commission
CLARK no commission
SCOTT no commission
KING no commission
TURNER
ADAMS no commission
JAMES no commission
FORD no commission
MILLER no commission
14 rows selected.
|
|
|
|
|