Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> like clause('%..%') in dbms_sql..
hi,
i am trying to locate a string(that i pass in as a parameter in the procedure)
ie; select col1 from sometable where col2 like '%param_in%';
i know there are many records, but my procedure is getting me nowhere.
what am i doing wrong?
is something wrong with the way iam doing the bind?
thanks in advance,
--uma
create or replace procedure someproc(param_in varchar2) as
--variables and cursor declaration
begin
tablecur:=dbms_sql.open_cursor;
open c1;
loop
fetch c1 into tname;
exit when c1%notfound;
begin stmt:='select col1 from '||tname||' where col2 like :theoldname'; dbms_sql.parse(tablecur, stmt, dbms_sql.v7); dbms_sql.bind_variable(tablecur, ':theoldname', '%param_in%'); retval:=dbms_sql.execute(tablecur);
.
.
.
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Dec 10 1998 - 18:22:54 CST