-1
這是我的程序:Dyanamic查詢通過傳遞一個String作爲Conditon檢查
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改變我希望從前端傳遞本身。
雖然excuting此查詢我正在和錯誤
ORA-01722的:無效的數量