Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/Attic/dotlrn-communities-package-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-package-create.sql 3 Apr 2002 00:33:12 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-package-create.sql 4 Apr 2002 05:55:45 -0000 1.3 @@ -164,13 +164,14 @@ party_id in parties.party_id%TYPE ) return char; + function url ( + community_id in dotlrn_communities.community_id%TYPE + ) return varchar2; + function has_subcomm_p ( community_id in dotlrn_communities.community_id%TYPE ) return char; - function url ( - community_id in dotlrn_communities.community_id%TYPE - ) return varchar2; end dotlrn_community; / show errors @@ -325,14 +326,12 @@ is v_rv char(1); begin - - select decode(count(*), 0, 'f', 't') into v_rv - from dual where exists ( - select 'x' - from dotlrn_communities - where parent_community_id = community_id - ); - + select decode(count(*), 0, 'f', 't') + into v_rv + from dual + where exists (select 1 + from dotlrn_communities + where parent_community_id = has_subcomm_p.community_id); return v_rv; end;