How to create a TypeList for this Select Statement

Posts   
 
    
paul837
User
Posts: 1
Joined: 29-Aug-2005
# Posted on: 29-Aug-2005 17:20:17   

Can anyone help me create a TypeList for this Select Statement:

Thanks

SELECT COUNT(DISTINCT(a.ID)) FROM Table1 a, Table2 b, Table3 c, Table4 d WHERE (a.ID = b.ID_FK OR a.ID = c.ID_FK) AND d.ID = a.ID_FK

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 30-Aug-2005 03:46:54   

The join you are proposing doesn't follow recommended standards. Even if it does execute I'd be suspect that the results are valid and/or consistent.

With that said, take a look at the LLBLGen User Manual. Look for the "Creating dynamic lists" section of the Generated code - Using the typed view and typed list classes, (SelfServicing or Adapter) page. This is an extremely flexible way to join tables using LLBLGen.

Also review the "Custom filters for EntityRelations" section of the Generated Code - filtering and sorting, (SelfServicing or Adapter) for details on adding conditions to your ON clause.