Complex query

Posts   
 
    
roastmb
User
Posts: 1
Joined: 30-Mar-2007
# Posted on: 30-Mar-2007 20:15:38   

Hello,

Does anyone know how I could get LLBLGen to construct a query similar to:

SELECT * FROM Registration

WHERE

RegistrationID IN ( SELECT RegistrationID FROM Registration_Capability RC WHERE CapabilityID IN (237) )

AND

RegistrationID IN ( SELECT RegistrationID FROM Registration_Capability RC WHERE CapabilityID IN (253) )

Thanks!

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 30-Mar-2007 23:52:17   

Hi roastmb,

You should use FieldCompareSetPredicate. Please review the LLBLGenPro Help - Using Generated Code - Adapter (of SelfServicing) - Filtering and Sorting - The predicate system - FieldCompareSetPredicate for the IN Clause subquery. These threads may give you some lights too: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=8676 http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=9290

CapabilityID IN (237)

Is there a specific reason for you used IN instead of Equal (=)?

Regards

David Elizondo | LLBLGen Support Team