저 쿼리문이 안되는데 도움좀 요청합니다..ㅠ.ㅠ
오라클 쿼리는 ?羔? 복잡한지...크크
asp ms-sql을 php-oracle로 변경중이거든요~^^
Select Der.*, (C01+C02) as TOTAL
From ( Select AGENT_ID as X_NAME, NVL(AGENT_NM, AGENT_ID) as X_VALUE
, SUM(DECODE( DATEPART(weekday, convert(smalldatetime, R_S_DATE)),1,1,0)) as 'C01'
, SUM(DECODE(DATEPART(weekday, convert(smalldatetime, R_S_DATE)),2,1,0)) as 'C02'
From TRECORD A
Where A.RFILE_NAME is not null
and A.R_S_DATE <> 'NULL'
and A.R_S_DATE >= '20060326'
and A.R_S_DATE <= '20061026'
Group By AGENT_ID , NVL(AGENT_NM, AGENT_ID)
) Der Order By X_NAME