Index: openacs-4/packages/acs-kernel/sql/oracle/utilities-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/utilities-create.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-kernel/sql/oracle/utilities-create.sql	27 Oct 2014 16:39:35 -0000	1.3
+++ openacs-4/packages/acs-kernel/sql/oracle/utilities-create.sql	7 Aug 2017 23:47:56 -0000	1.4
@@ -1,3 +1,4 @@
+PROMPT starting utilities-create.sql....
 --
 -- /packages/acs-kernel/sql/utilities-create.sql
 --
@@ -82,33 +83,89 @@
         name IN varchar2)
     return boolean
     as
+
+      v_count integer;
+      v_exists boolean;
+
     begin
-      return exists (select 1 from user_tables where table_name = t_name);
+
+      select decode(count(*),0,0,1) into v_count 
+      from user_tables where table_name = upper(table_exists.name);
+
+      if v_count = 1 then
+        v_exists := true;
+      else
+        v_exists := false;
+      end if;
+
+      return v_exists;
+
     END table_exists;
     
     function table_column_exists (
         t_name  IN varchar2,
         c_name IN varchar2)
     return boolean
     as
+      v_count integer;
+      v_exists boolean;
+
     begin
-      return exists (select 1 from user_tab_columns where c.table_name = t_name and c.column_name = c_name);
+
+      select decode(count(*),0,0,1) into v_count from user_tab_columns
+      where table_name = upper(table_column_exists.t_name)
+      and column_name = upper(table_column_exists.c_name);
+
+      if v_count = 1 then
+        v_exists := true;
+      else
+        v_exists := false;
+      end if;
+
+      return v_exists;
+      
     END table_column_exists;
     
     function view_exists (
         name IN varchar2)
     return boolean
     as
+      v_count integer;
+      v_exists boolean;
+
     begin
-      return exists (select 1 from user_views where view_name = name);
+
+      select decode(count(*),0,0,1) into v_count 
+      from user_views where view_name = upper(view_exists.name);
+
+      if v_count = 1 then
+        v_exists := true;
+      else
+        v_exists := false;
+      end if;
+
+      return v_exists;
+
     END view_exists;
     
     function index_exists (
         name IN varchar2)
     return boolean
     as
+      v_count integer;
+      v_exists boolean;
+
     begin
-      return exists (select 1 from user_indexes where index_name = name);
+      select decode(count(*),0,0,1) into v_count 
+      from user_indexes where index_name = upper(index_exists.name);
+
+      if v_count = 1 then
+        v_exists := true;
+      else
+        v_exists := false;
+      end if;
+
+      return v_exists;
     END index_exists;
 
 end util;
