SELECT TEMP_PAYMINUS.PRIMARYID,
TEMP_PAYMINUS.BILLDATE,
TEMP_PAYMINUS.CYEAR,
TEMP_PAYMINUS.CMONTH,
TEMP_PAYMINUS.GZKKXM,
TEMP_PAYMINUS.BILLNO,
TEMP_PAYMINUS.STAFFID,
TEMP_PAYMINUS.PSNCODE,
TEMP_PAYMINUS.PSNNAME,
TEMP_PAYMINUS.DEPTCODE,
TEMP_PAYMINUS.DCTYPE,
TEMP_PAYMINUS.DCFLAG,
TEMP_PAYMINUS.AMOUNT,
TEMP_PAYMINUS.MEMO,
TEMP_PAYMINUS.REMARK,
TEMP_PAYMINUS.MAKEUSER,
TEMP_PAYMINUS.BILLSTATUS,
TEMP_PAYMINUS.CHECKUSER,
TEMP_PAYMINUS.CHECKDATE,
TEMP_PAYMINUS.TALLYUSER,
TEMP_PAYMINUS.TALLYDATE,
TEMP_PAYMINUS.UPDATEUSER,
TEMP_PAYMINUS.UPDATEDATE,
TEMP_PAYMINUS.DUTYDEPT,
TEMP_PAYMINUS.SOURCETYPE,
TEMP_PAYMINUS.CREATEDATE,
TEMP_PAYMINUS.RANDOMID
FROM TEMP_PAYMINUS
WHERE ((TEMP_PAYMINUS.DUTYDEPT IN
(SELECT PROPERTYVALUE
FROM TEMP_ROLEPROPERTY
WHERE ROLECODE IN ('D006320')
AND PROPERTYCODE = 'DUTYDEPT')))
AND (((TEMP_PAYMINUS.CYear >= '2007' AND TEMP_PAYMINUS.CMonth >= '07' AND
TEMP_PAYMINUS.CYear <= '2007' AND TEMP_PAYMINUS.CMonth <= '08' AND
TEMP_PAYMINUS.GZKKXM = '01' AND TEMP_PAYMINUS.DUTYDEPT = '0023' AND
TEMP_PAYMINUS.DCTYPE = '101'))) |