Steve Berger
asked on
Erase CLOB data
Hi,
Is it possible to erase the data from the CLOB? If yes please let me know how?
Thanks
Is it possible to erase the data from the CLOB? If yes please let me know how?
Thanks
update yourtable set your_clob = NULL where....
>>update yourtable set your_clob = NULL
or
update yourtable set your_clob = empty_clob() where....
depending on exactly what they want to do.
or
update yourtable set your_clob = empty_clob() where....
depending on exactly what they want to do.
ASKER
No i wanted to erase only some part not the whole data
ASKER
And also how do i come to know the starting point and the ending point to erase. I have only the string which i need to erase.
>>erase only some part
OK, now what does 'erase'?
for example:
in this clob I want to erase the first word clob
Do you want 'clob' spaced out or 'removed'?
in this I want to erase the first word clob
or
in this I want to erase the first word clob
OK, now what does 'erase'?
for example:
in this clob I want to erase the first word clob
Do you want 'clob' spaced out or 'removed'?
in this I want to erase the first word clob
or
in this I want to erase the first word clob
If you want it removed, doc link but look for: FRAGMENT_DELETE
>>And also how do i come to know the starting point and the ending point to erase
ALL strings in the clob, just the first, last, ???
same doc link: dms_lob.instr
ALL strings in the clob, just the first, last, ???
same doc link: dms_lob.instr
ASKER
could you please provide some sample code for my clear understanding
As soon as you answer my questions:
ALL strings in the clob, just the first, last, ???
and what you mean by erase, replace with spaces or remove?
In other words: What if the 'string' appears more than once?
Also post your Oracle version.
ALL strings in the clob, just the first, last, ???
and what you mean by erase, replace with spaces or remove?
In other words: What if the 'string' appears more than once?
Also post your Oracle version.
ASKER
Not all string in the CLOB. only the sting which i am having in some local variable.
the string never appears more than once in CLOB.
I am using Oracle 10g version.
the string never appears more than once in CLOB.
I am using Oracle 10g version.
now.... define 'erase'.
Repeat from when I asked in http:#a34980868
Do you want 'clob' spaced out or 'removed'?
in this I want to erase the first word clob
or
in this I want to erase the first word clob
Repeat from when I asked in http:#a34980868
Do you want 'clob' spaced out or 'removed'?
in this I want to erase the first word clob
or
in this I want to erase the first word clob
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
For my requirement first function will suite. when i call eraseCLOB function i am getting below error.
ORA-21560: argument 3 is null, invalid, or out of range
ORA-21560: argument 3 is null, invalid, or out of range
You get that error when you are running my test example as-is or when you try to run it in your system.
ASKER
GOOD ONE
Do you want to delete the entire contents or part of the clob?
If part of the lob, to you want the erased part to be removed or just over written?
Check out DBMS_LOB.ERASE
http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16760/d_lob.htm#i997838