I have large strings in NCLOB column and I’m allowing users to search in them. I’d like to diplay the results in best way possible. Is there any way to ‘cut’ some previous and next words in my result set?
The results are found by using dbms_lob.instr() function. I’ve found some solutions, but they are way to complex and slow to use them in this case.
What wold be most effective way? Combination of instr and susbstr? Or regexp? I’m worried about the regexp performance on LOB columns.
Ok, I did it! Like this
It cuts of 80 chars around the key and after that couts out full words (from first space to last space/comma/slash/backshlash).