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: Jan Benjamins <j.benjamins_at_a1.nl>
Date: Tue, 27 Apr 1999 21:52:38 +0200
Message-ID: <7g544c$l6h$1@news.a1.nl>

From: Jan Benjamins <j.benjamins_at_a1.nl> To: Ed Prochak <prochak_at_my-dejanews.com> Subject: Re: cannot execute my script file !! Date: dinsdag 27 april 1999 21:50

> 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;

What about :

exec :q_name := q_prod('&product_no')

>
>
> 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 - 14:52:38 CDT

Original text of this message

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