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>...
>
> 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 WuReceived on Tue Mar 04 2003 - 15:02:01 CET