Skip to Main Content

SQL & PL/SQL

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!

Newbie. Using CLOB bind variable to select and compare to a CLOB table field.

User_H76VHNov 25 2019 — edited Nov 25 2019

Hi,

I am a newbie with Oracle since I am a sql server guy.

I got a very large CLOB field in the table. I am trying to compare the CLOB field with a CLOB variable with the following statement

declare

tempCLOB CLOB;

old_clob_content CLOB := 'very long 4000+ characters text';

begin

select CLOB_FIELD into tempCLOB

from databaseName.TableName

where dbms_lob.compare(CLOB_FIELD, old_clob_content) = 0;

end;

when I run this statement, I get the following error

ORA-06550 string literal too long

was hoping to get the select to work and then use the compare function with an update.

Thanks for any help.

Comments
Post Details
Added on Nov 25 2019
3 comments
1,879 views