日期:2014-05-16 浏览次数:20882 次
CREATE OR REPLACE FUNCTION EXISTS_ECGDATA (IN_SQL IN VARCHAR2)
RETURN NUMBER
IS
V_SQL VARCHAR2(4000);
V_CNT NUMBER(1);
BEGIN
V_SQL := 'SELECT COUNT(*) FROM DUAL WHERE EXISTS ('
------解决方案--------------------
IN_SQL
------解决方案--------------------
')';
EXECUTE IMMEDIATE V_SQL INTO V_CNT;
RETURN(V_CNT);
END;
/
/*创建NewID()方法*/
CREATE OR REPLACE FUNCTION CREATEGUID
RETURN varchar2
is
guid varchar(64);
begin
guid := SYS_GUID();
return
substr(guid,1,8)
------解决方案--------------------
''-''
------解决方案--------------------
substr(guid,9,4)
------解决方案--------------------
''-''
------解决方案--------------------
substr(guid,13,4)
------解决方案--------------------
''-''
------解决方案--------------------
substr(guid,17,4)
------解决方案--------------------
''-''
------解决方案--------------------
substr(guid,21,12);
end CREATEGUID;
/