存儲過程修改CLOB字段

?
CREATE OR REPLACE PROCEDURE INSERT_RES_PEOPLE_ADD
(
?r_people_cname????????? varchar2,
?r_people_intro????????? varchar2
)
AS
r_intro_clob clob;--
buffer? varchar2(32767);
amount? number := 2000;
offset? number := 1;
BEGIN
? select clobf into r_intro_clob from ztable where RES_CLASS_ID = 9;
? if r_intro_clob is null then
??? update ztable set clobf = 'buffer' where RES_CLASS_ID = 9;
??? return ;
? end if;
?
? amount := dbms_lob.getlength(r_intro_clob);
? dbms_lob.read(r_intro_clob,amount,offset,buffer);
? buffer := buffer || r_people_intro;
?update ztable set clobf = buffer where RES_CLASS_ID = 9;
EXCEPTION
??? when others then
??? rollback;
??? --raise;
??? return;
END;
?
?
select to_clob(replace(DBMS_LOB.SUBSTR(cb),'a','b')) from test_clob t
?

?
?
相關文章
相關標籤/搜索