Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: cannot execute my script file !!

Re: cannot execute my script file !!

From: Ed Prochak <prochak_at_my-dejanews.com>
Date: Tue, 27 Apr 1999 12:57:16 GMT
Message-ID: <7g4c7b$l0o$1@nnrp1.dejanews.com>


In article <AS8V2.25384$134.287899_at_tor-nn1.netcom.ca>,   "deb" <dnanda_at_netcom.ca> wrote:
> The script file goes like this :-
>
> set echo off verify off head off feed off
> accept product_no varchar2 -
> prompt 'what name would you like..'
> variable q_name varchar2(30)
> execute :q_name :=q_prod('&product_no')
> set head on feed on
> print q_name
> set echo on verify on
>
> And the function that has been called is as follows -
> create or replace function q_prod
> (v_id varchar2) return varchar2 is
> v_name varchar2(30);
> begin
> select name into v_name from sales where s_no=v_id;
> return(v_name);
> end q_prod;
>
> thanks
>
>

One problem is that you try to execute a function. You should execute procedures, and fetch functions. try

SELECT q_prod('&product_no') into :q_name from dual;

It is good that you included sample code, but we cannot read your terminal. Just a gentle reminder that next time please include the other information, particularly the error message you received.

Have a good day.

--
Ed Prochak
Magic Interface, Ltd.
ORACLE services
440-498-3702

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Apr 27 1999 - 07:57:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US