Commit 53f9e033 authored by nsawalakhe's avatar nsawalakhe

Added new sql for JNJ attendance compliance report .


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100358 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e93e9e9f
select A.SALES_PERS, SP.SP_NAME, A.LAST_REPORT, ROUND(TRUNC(sysdate)-TRUNC(A.LAST_REPORT)) NOT_REPORTED,
I.DESCR ITEM_SERIES, E.HOBBY1 REGION, E.CUR_STATE STATE,
(NVL(TRIM(E1.EMP_FNAME),'')||NVL(TRIM(E1.EMP_MNAME),' ')||NVL(TRIM(E1.EMP_LNAME),'')) EMP_NAME, E.MOBILE_NO
FROM
(SELECT t.SALES_PERS,Max(T.EVENT_DATE) LAST_REPORT FROM SPRS_ACT_TRAN T
WhERE T.SALEs_PERS IN (SELECT S.SALES_pERS FROM SALES_PErS S INNER JOIN EMPLOYEE E ON S.SALES_PERS = E.EMP_CODE
WHERE S.ACTIVE_YN='Y'
start with e.emp_code = :EMP_CODE
connect by prior E.EMP_CODE = E.REPORT_TO)
GRoup by t.SALES_PERS)A INNER JOIN SALES_PERS SP ON A.SALES_PERS = SP.SALES_PERS
INNER JOIN EMPLOYEE E ON SP.SALES_PERS = E.EMP_CODE
INNER JOIN ITEMSER I ON I.ITEM_SER=SP.ITEM_SER
LEFT OUTER JOIN EMPLOYEE E1 ON E1.EMP_CODE = E.REPORT_TO
;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment