Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: pl/sql
Hi,
The promlem arise due to 'bacref' has no elements. See fixed code below
CREATE OR REPLACE PROCEDURE vsu_word_search AS
line CHAR(100) := 'that is fine yes it is';
pat CHAR(10) := 'is';
--
Valery Yourinsky
--
Oracle8 Certified DBA
ramirez134_at_my-deja.com wrote:
> > In article <3A66F003.86B23DCD_at_bill.mts.ru>, > Valery Yourinsky <vsu_at_bill.mts.ru> wrote: > > ramirez134_at_my-deja.com wrote: > > CREATE OR REPLACE procedure word_search > > AS > > line char(100) := 'that is fine yes it is'; > > pat char(10) := 'is'; > > bacref owa_text.vc_arr; > > -- > > has_match BOOLEAN; > > -- > > BEGIN > > htp.htmlOpen; > > htp.headOpen; > > htp.title('word search'); > > htp.headClose; > > htp.bodyopen; > > -- > > -- No apostrophes! > > has_match := owa_pattern.match(line, pat, bacref); > > IF has_match = TRUE THEN > > FOR K IN bacref.FIRST .. bacref.LAST LOOP > > htp.p('K='||K||' "' ||bacref(K)||'"'); > > htp.br; > > END LOOP; > > END IF; > > -- > > htp.bodyClose; > > htp.htmlClose; > > END; > > > > Valery Yourinsky > > -- > > Oracle8 Certified DBA > > Is there still something wrong, because I get message: > ORA-06502: PL/SQL: numeric or value error > > Is this definition right > bacref owa_text.vc_arr; > > THANKS AGAINReceived on Fri Jan 19 2001 - 04:28:16 CST