Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Substring records in a column which exceeds 4000 characters

978268Dec 16 2012 — edited Dec 18 2012
I have a column (URL) which contains URL values with a varchar2(4000) data type. Some of the values in there exceed 4000 characters, so is there a way for me to substring only those values in the column that exceed 4000 characters replacing the original value with the substring within that same column?
I understand that I may lose some data, but I can afford that. I did try to see the values which exceed 4000 characters, but all I got was two columns (ses_id, length(url)) with no rows. There are around 8400 records.
select ses_id, length(url)
from weblog_o_trial
where length(url) > 4000;
P.S. I need the data to be in varchar2 datatype. I'm attempting to apply text mining techniques on the data, but it doesn't accept CLOB, or nvarchar2 datatype.

Oracle version 3.0.04

Edited by: 975265 on Dec 18, 2012 10:21 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 15 2013
Added on Dec 16 2012
3 comments
1,457 views