Multiple fields in FieldCompareSetPredicate

Posts   
 
    
DarkRoast
User
Posts: 42
Joined: 14-Jul-2010
# Posted on: 07-May-2012 23:20:37   

Is there a way to specify the following query in LLBL?

select * from someTable where ( (someTable.item, someTable.itemdate) not in (select otherTable.item, otherTable.itemdate from otherTable ) )

LLBL 3.1, Self-Servicing, ODP.Net DQE

Thanks for any assistance.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 08-May-2012 07:32:07   

I didn't know you can do that. This is not supported, you should use EXISTS instead: pass null to the field paramter and specify a filter:

bucket.PredicateExpression.Add(new FieldCompareSetPredicate(
    null, null, OtherFields.Item, null,
    SetOperator.In, (SomeFields.Item == OtherFields.Item & SomeFields.ItemDate == OtherFields.ItemDate)));

which will generate:

WHERE EXISTS
  (SELECT OtherTable.Item
    WHERE SomeTable.Item = OtherTable.Item AND SomeTable.ItemDate = OtherTable.ItemDate)
David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 08-May-2012 09:47:36   

It's an oracle specific feature, if I recall correctly. Not supported directly.

Frans Bouma | Lead developer LLBLGen Pro