Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Would like to do .... LIKE '%fred%' on LONG column
I wasn't thinking. You only have to search through the LONG once; just step back 3
bytes after grabbing a chunk of the LONG. So 1 - 32,003 then 32,000 - 64,003 then
64,000 - 96,003 and so on....
Jay!!!
Jason Jay Weiland wrote:
> Paul,
>
> You could pull out chunks of the LONG with the DBMS_SQL.Column_Value_Long
> procedure. Using PL/SQL, you would pull out 32K (or any smaller size) chunks,
> assign them to a VARCHAR and then look for '%fred%' within that chunk. The
> obvious downsides:
>
> 1) If 'fred' is on the 32K border and then split (e.g. chunck A ends with ' fre'
> and chunk B starts with 'd '). You could solve this by doing a four searches,
> offsetting the search by 0, 1, 2, then 3.
[snip] Received on Wed Oct 21 1998 - 15:16:35 CDT
![]() |
![]() |