Compare CLOB

Posts   
 
    
Dimon
User
Posts: 9
Joined: 29-Mar-2009
# Posted on: 02-Aug-2009 15:41:14   

Hi, I need to perform compare (dbms_lob.compare) operation on CLOB column. I saw this post: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=1574&HighLight=1 The solution is to create LIKE predicate class and override ToQueryText() method so it will use dmbs_lob.compare(). This post is from 19-Oct-2004. Before starting to write my own LIKE predicate class I wanted to check maybe today there is some other way to compare CLOB data type? simple_smile

Thank you!

Version: 2.6 Build: 2.0.3496.28931

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 03-Aug-2009 08:30:00   

Before starting to write my own LIKE predicate class I wanted to check maybe today there is some other way to compare CLOB data type?

Nothing new about this, so you'll have to implement the predicate yourself.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 03-Aug-2009 08:59:37   

... or use FieldCompareExpression, and use a DbFunctionCall expression to the db function wink

Frans Bouma | Lead developer LLBLGen Pro
Dimon
User
Posts: 9
Joined: 29-Mar-2009
# Posted on: 03-Aug-2009 12:33:28   

Thank you!

DbFunctionCall is what we need smile



object[] funcParams = new object[2];
funcParams[0] = TextbankFields.Text;
funcParams[1] = tb.Text;

RelationPredicateBucket predicate = new RelationPredicateBucket();

...
...
...

predicate.PredicateExpression.Add(new EntityField2("TBText", new DbFunctionCall(DBConsts.CLOB_COMPARE_FUNCTION, funcParams)) == 0);