Hi,
I'm trying the following:
function func_recordsdb_used return varchar2
is
iv_exist NUMBER;
iv_recordsdb NUMBER;
iv_value varchar2(5) ;
BEGIN
select count(*) INTO iv_exist from dba_tables where table_name ='ODM_RECORD';
IF iv_exist > 0 THEN
SELECT count(*)
INTO iv_recordsdb
FROM odm_record;
ELSE
iv_recordsdb := 0;
END IF;
IF iv_recordsdb > 0 THEN
iv_value := 'TRUE';
ELSE
iv_value := 'FALSE';
END IF;
RETURN(iv_value) ;
END func_recordsdb_used;
I get a error because odm_record isn't there but that shouldn't be a problem because it won't be reached when the iv_exist variable is 0.
How can I work around this problem?
