以下是我的包裹代码。
CREATE OR REPLACE PACKAGE BODY MyPackageBody AS
FUNCTION MyFunction(Param1 IN VARCHAR2,Param2 IN DATE) RETURN BOOLEAN IS
SELECT TRUE FROM MYTABLE WHERE MYCOLUMN1=Param1 AND MYCOLUMN2=Param2;
END MyFunction;
End MyPackageBody;
我正在测试我的函数正在执行以下语句,
select MyPackageBody.MyFunction('abc',sysdate) from dual;
select MyPackageBody.MyFunction('abc',to_date('06/30/2015 6:20:19 PM','MM/DD/YYYY HH12:MI:SS PM')) from dual;
在这两种情况下,我都会弹出错误"ORA-00902: invalid datatype"