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 -> select and insert long column in a stored procedure

select and insert long column in a stored procedure

From: luio <lctNOlcSPAM_at_hotmail.com.invalid>
Date: 2000/08/09
Message-ID: <0b690f9a.1182259d@usw-ex0104-026.remarq.com>#1/1

create table tb2(.., xlong long);
PROCEDURE copyLong IS

p_query varchar2(256);
l_cursor integer default dbms_sql.open_cursor;
l_n number;
l_long_val varchar2(250);
l_long_len number;
l_buflen number := 250;
l_curpos number := 0;

myvar long default '';
BEGIN
p_query := 'insert into tb2(xlong ,cl1,cl2,cl3) select xlong ,cl1,cl2,cl3 from tb2 where ruleid = 2';
dbms_sql.parse(l_cursor,p_query,dbms_sql.native);
dbms_sql.define_column_long(l_cursor,1);
dbms_sql.define_column_long(l_cursor,5);
l_n := dbms_sql.execute(l_cursor);
dbms_sql.close_cursor(l_cursor);
exception
when others then
if dbms_sql.is_open(l_cursor) then
dbms_sql.close_cursor(l_cursor);
end if;

raise;

end copyLong;

what's wrong with this procedure? any suggestiON?


Got questions? Get answers over the phone at Keen.com. Up to 100 minutes free!
http://www.keen.com Received on Wed Aug 09 2000 - 00:00:00 CDT

Original text of this message

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