We help IT Professionals succeed at work.
Get Started

Error using replace in procedure in large data field. ORA-01460: unimplemented or unreasonable conversion requested

ghanrahan
ghanrahan asked
on
1,578 Views
Last Modified: 2012-06-27
Please help.  I am using REPLACE within a procedure to change some data.  The procedure is failing because some of the data fields are massive.  They can be up to 18,000 characters.  The data is normally stored as a long data type in the db.  It works fine when the data string is only a few thousand characters.  Here is the error I am receiving.  It is followed by the procedure code.  

P.S. -- Thanks very much in advance for your assistance.  This error driving me nuts.

SQL> execute proc_script_fix;
BEGIN proc_script_fix; END;

*
ERROR at line 1:
ORA-01460: unimplemented or unreasonable conversion requested
ORA-06512: at "DBO.PROC_SCRIPT_FIX", line 19
ORA-06512: at line 1

**************************
Here is the code for the procedure -- thanks again
**************************
CREATE OR REPLACE PROCEDURE           PROC_SCRIPT_FIX
is
cursor proc_script_me_cursor is
      select saveid, docid, bookmarkdata
      from sti_se_sav_bmk
            where saveid > 6000
    and saveid in (6590);
local_saveid number(38);
local_docid number(38);
local_bookmarkdata varchar2(18000);
new_bookmarkdata varchar2(18000);
new_dbname varchar2(4);
begin
  open proc_script_me_cursor;
  select 'sprd' into new_dbname from dual;
       fetch proc_script_me_cursor into local_saveid, local_docid, local_bookmarkdata;
      while proc_script_me_cursor%found
       loop
          select replace(local_bookmarkdata, 'fcdb429_msqa1', 'sprd') into new_bookmarkdata from dual;
          update sti_se_sav_bmk
            set bookmarkdata = new_bookmarkdata
            where saveid = local_saveid;
          commit;
        fetch proc_script_me_cursor into local_saveid, local_docid, local_bookmarkdata;
       end loop;
end;
/
Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2012
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 2 Answers and 25 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE