这是我的程序:
PROCEDURE SP_SALARYADVANCE_RPT_TEST
(
txtExtraQuery IN STRING,
refcur OUT sys_refcursor )
OPEN refcur FOR
SELECT DISTINCT( SAL.ADVANCENO ), SALARYADVANCEID, SAL.TRANSDATE, SAL.APPROVEDREMARKS, SAL.APPROVEDAMOUNT, SAL.PAYRECAMOUNT, EMP.EMPLOYEENAME, EMP.EMPLOYEECODE
FROM HRM_SALARYADVANCE SAL, HRM_EMPLOYEE EMP, HRM_EMPLOYEEDEPARTMENTS DEPTS
WHERE SAL.EMPLOYEEID = EMP.EMPLOYEEID AND
SAL.EMPLOYEEID = DEPTS.EMPLOYEEID AND
DEPTS.DEPARTMENTID = txtdeptid || txtextraquery;
这里我的问题是我AND SAL.STATUS in (1,2,3)
作为参数发送这个 1,2,3 可能会改变我希望从前端本身传递它。
在执行此查询时,我得到了错误
ORA-01722: 无效号码