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

Home -> Community -> Usenet -> c.d.o.server -> Re: create store procedure in linux ..HELP !

Re: create store procedure in linux ..HELP !

From: nomenclature <nom_at_tonal.net>
Date: Thu, 19 Oct 2000 16:17:43 +0100
Message-ID: <39EF1097.C07B96F1@tonal.net>

Indosat wrote:
>
> hi,
> any body help me, how to create store procedure in linux ?
> actually, I'm is newbie in linux oracle.
>
> usually I use console (in win NT) to create SP. I try copy a script from
> oracle nt, and execute the script (in sql plus), but get no response...
>
> tks
> Lucas

create a file called your_procname.sql
use vi (or something). Syntax is like
this, first there's the create, then variable declarations, then the code block.


create or replace procedure build_retest is cursor retest_lid is select col1 from table1 where nvl(cap_aeth_val,0) <= 0;
rl_rec retest_lid%rowtype;
fld_ctr integer := 0;
fhOutFile UTL_FILE.FILE_TYPE;

sText     varchar2(1023);
l         integer;
i         integer;

begin
  fhOutFile := UTL_FILE.FOPEN('/base/lts/results', 'cap0.dat', 'w');   open retest_lid;
  loop
   fetch retest_lid into rl_rec;
   exit when retest_lid%notfound;
   UTL_FILE.PUT_LINE(fhOutFile, rl_rec.telephone);   end loop;
  close retest_lid;
 utl_file.fclose( fhOutFile );
end build_retest;
Received on Thu Oct 19 2000 - 10:17:43 CDT

Original text of this message

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