Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Help newbie with SQL code

Help newbie with SQL code

From: 1 <1_at_1.com>
Date: Thu, 15 Mar 2001 19:18:19 -0500
Message-ID: <tb2n2ilp13ab22@corp.supernews.com>

What is wrong with this statement

SELECT hiredate,
DECODE (hiredate,(hiredate<01-jan-81),count(hiredate),hiredate) from emp;

Help. the question was to use the Oracle training database table emp and count the emplyees that were hired by hiredate.   output should look like this

TOTAL 1980 1981 1982 1983

--------      -----    -----  ------   -----
14                1        10        2         1


I know you need DECODE but I just dont know if you can inbed things

Thanks
Andy Received on Thu Mar 15 2001 - 18:18:19 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US