Evan Cutler
asked on
Clob operation in oracle
Greetings ee warriors.
I have a text larger than 4000 characters. Nominally I would use varchar but varchar limits to 4000. In this case I need to run a near function on a clobber.
I have two words and I need to know if they are near each other....but like I said, in a clobber datatype.
Help?
Thx
I have a text larger than 4000 characters. Nominally I would use varchar but varchar limits to 4000. In this case I need to run a near function on a clobber.
I have two words and I need to know if they are near each other....but like I said, in a clobber datatype.
Help?
Thx
ASKER
Is true left? If so, what's right? And in either direction?
True for the preserve flag means the terms must appear in the order provided.
For right, reverse the words?
To say any order, use false.
For right, reverse the words?
To say any order, use false.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks...
one more question...
what's the >0 mean?
Appreciate it.
one more question...
what's the >0 mean?
Appreciate it.
The online docs are your friend.
Check the return values in the docs for CONTAINS and REGEXP_INSTR. If you still need help, just ask.
http://download.oracle.com/docs/cd/E11882_01/text.112/e24436/csql.htm#CCREF0104
http://download.oracle.com/docs/cd/E11882_01/olap.112/e17122/dml_functions_2067.htm#OLADM1851
Check the return values in the docs for CONTAINS and REGEXP_INSTR. If you still need help, just ask.
http://download.oracle.com/docs/cd/E11882_01/text.112/e24436/csql.htm#CCREF0104
http://download.oracle.com/docs/cd/E11882_01/olap.112/e17122/dml_functions_2067.htm#OLADM1851
ASKER
Your awesome...
thanks.
thanks.
Glad to help.
I guess I should have pointed out that the regexp_instr examples do not require the Text index. Only the contains examples do.
I guess I should have pointed out that the regexp_instr examples do not require the Text index. Only the contains examples do.
ASKER
cool.
Appreciate it.
Appreciate it.
Then to check if they are withing 5 words of each other and word1 is LEFT of word2:
select some_column form table where contains(clob_column,'near
You might also get away with some regular expressions if running 10g or above:
something like (untested) for 50 to 100 charactrers:
select some_column where regexp_instr(clobcolumn,'(