Re: WHY can't I call a function from within a formula column???

From: Álvaro Palma Aste <queria_direccion_at_el.perla?>
Date: 17 Dec 2001 15:06:47 GMT
Message-ID: <9vl1m7$og7$3_at_news.cec.uchile.cl>


John escribió:
>Hello,
>I am trying to modify pl/sql code behind a formula column (reports 2.5.7.17)
>and get this message when I try to compile:
>Function 'GETJOB' may not be used in SQL

>The code for the formula column:
>function CF_toolsFormula return Number is

>v_var1 VARCHAR2(10);
>begin
>BEGIN
>SELECT a.field1,
>INTO v_var1
>FROM table1 a,
>table2 b
>WHERE a.id = b.id
>AND a.job = :job
>AND rsi_attr.getjob(a.id, a.f1) = 1 ;
>END;
>END;

>The only line I added was the last line of WHERE clause (call to the
>function). Can you really not reference a function in a package from a
>formula column? I believe I did this with version 6. Is there a workaround
>to accomplish this in version 2?

>Thanks in advance, Brad

Why don´t you call externally the function, i.e. outside the select statement? or within a cursor? PL/SQL often fails with "cryptics" sql statement :-)

-- 
Atte.
Álvaro Palma Aste
Grupo de Ing. Biomédica
Depto. de Ing. Eléctrica - U. de Chile
apalma_at_cec.uchile.adivina
Received on Mon Dec 17 2001 - 16:06:47 CET

Original text of this message