Re: Can't put SELECT in formula column

From: Michael Krolewski <vandra_at_u.washington.edu>
Date: Tue, 25 Aug 1998 23:12:41 -0700
Message-ID: <35E3A759.11186B1F_at_u.washington.edu>


I have not tried to code it, but have you tried the obvious

function...
ret_var Number(5);
begin
  ret_var := MONTHS_BETWEEN (:BIRTH_DATE, :CURRENT_DATE);   return ret_var;
end;

Many of the functions are available directly in PL/SQL and only through select statements outside
of the language.

Mike Krolewski

csdi wrote:

> Hi there,
> here is my problem, I want to caculate the age of members using the
> MONTHS_BETWEEN PL/SQL formula in a formula column but I can't run ANY
> select statement in the formula column it always gives me a 'Fatal PL/SQL
> error occured.' and the report aborts.
> Here is my code, what am I doing wrong?
>
> function CF_DEPENDANT_AGEFormula return Number is
> ret_var Number(5);
> begin
> ret_var := 'Select MONTHS_BETWEEN (:BIRTH_DATE, :CURRENT_DATE) from
> dual;';
> return ret_var;
> end;
>
> Thanks in advance. Any help even on any Select statement would be great.
>
> Guy :)
Received on Wed Aug 26 1998 - 08:12:41 CEST

Original text of this message