using FieldCompareValuePredicate where the value is set as first parameter

Posts   
 
    
dcarapic
User
Posts: 60
Joined: 21-Dec-2007
# Posted on: 30-Mar-2010 14:50:25   

Hello, Using LLBGen pro v2.5 June 2nd, 2008 with Oracle 11g MS provider.

Maybe this question has already been answered before (I searched for something similar to this but did not found anything). I would like to make a filter like this:

SELECT * FROM SOME_TABLE T WHERE '1235' LIKE T.FIELD;

As far as I can understand, only this is possible:

SELECT * FROM SOME_TABLE T WHERE T.FIELD LIKE '1235' ;

In a nutshell the T.FIELD holds wild-card characters which should be compared against a string. Thanks.

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 30-Mar-2010 21:14:03   

Sorry, we don't support this at the moment. Does this query actually work in Oracle ?

Matt

dcarapic
User
Posts: 60
Joined: 21-Dec-2007
# Posted on: 30-Mar-2010 22:50:32   

Yep. Query is a bit expensive but we need it.

Can it be done with some sort of an expression or can we build the filter by direct SQL injection?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 31-Mar-2010 04:27:42   

Some guy implemented this time ago for SQLServer. It's called FieldReverseLikePredicate. This is the code: http://llblgen.com/tinyforum/Messages.aspx?ThreadID=14430

Give it a try wink

David Elizondo | LLBLGen Support Team
dcarapic
User
Posts: 60
Joined: 21-Dec-2007
# Posted on: 31-Mar-2010 09:20:12   

Thanks, I'll try it.