Re: any syntax similar as " with select " clause in ibm db2?
From: John <johnwu_at_yorku.ca>
Date: 4 Mar 2003 06:02:01 -0800
Message-ID: <1673c1fd.0303040602.20407874_at_posting.google.com>
Date: 4 Mar 2003 06:02:01 -0800
Message-ID: <1673c1fd.0303040602.20407874_at_posting.google.com>
"Chris Leonard" <s_p_a_m_chris_at_hotmail.com> wrote in message news:<4VK8a.7$G_.18385_at_news.uswest.net>...
A good new over this issue is that, as Padderz said (see the second
message on this topic), Oracle 9i supports WITH clause. I tried that
but unfortunately there is still different syntax applying WITH from
the way applying in DB2.
>
> SELECT EMP.EMPNO, EMP.DEPTNO, DCOUNTS.TOTAL_EMPS
> FROM EMP
> JOIN (SELECT DEPTNO, COUNT(*) AS TOTAL_EMPS
> FROM EMP GROUP BY DEPTNO) DCOUNTS
> ON EMP.DEPTNO = DCOUNTS.DEPTNO;
>
Thanks you Chris, That's what I needed.
--
Thanks
John Wu
Received on Tue Mar 04 2003 - 15:02:01 CET