Well, what I have exactly is this:
function revision_name(
revision_id IN cr_revisions.revision_id%TYPE
) return varchar2 is
v_text varchar2(500);
begin
select
'Revision ' || content_revision.get_number(r.revision_id) || ' of ' ||
(select count(*) from cr_revisions where item_id = r.item_id)
|| ' for item: ' || content_item.get_title(item_id)
into v_text
from cr_revisions r
where r.revision_id = revision_name.revision_id;
return v_text;
end revision_name;
and it's giving me this:
Errors for PACKAGE BODY CONTENT_REVISION:
LINE/COL ERROR
-------- -----------------------------------------------------------------
322/6 PLS-00103: Encountered the symbol "SELECT" when expecting one of
the following:
( - + mod not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string>
323/5 PLS-00103: Encountered the symbol "|" when expecting one of the
following:
LINE/COL ERROR
-------- -----------------------------------------------------------------
; return returning and or
324/3 PLS-00103: Encountered the symbol "INTO" when expecting one of
the following:
. ( * % & = - + ; < / > at in mod not rem return returning
<an exponent (**)> <> or != or ~= >= <= <> and or like
between is null is not || is dangling
Maybe you just can't do it in PL/SQL??? This is Oracle 8.1.7.4. Thanks!