INSTR¶
The INSTR
function returns the location of the nth occurrence of a given
pattern within a large object.
<position> INTEGER INSTR(<lob_loc> { BLOB | CLOB },
<pattern> { RAW | VARCHAR2 } [, <offset> INTEGER [, <nth> INTEGER ]])
Parameters
lob_loc
Large object locator of the large object in which to search for pattern.
pattern
Pattern of bytes or characters to match against the large object,
lob. pattern
must beRAW
iflob_loc
is aBLOB
. pattern must beVARCHAR2
iflob_loc
is aCLOB
.
offset
Position within
lob_loc
to start search forpattern
. The first byte/character is position 1. The default is 1.
nth
Search for
pattern
,nth
number of times starting at the position given byoffset
. The default is 1.
position
Position within the large object where
pattern
appears the nth time specified bynth
starting from the position given byoffset
.