How can I ...?

Posts   
 
    
Stranger
User
Posts: 23
Joined: 22-Nov-2005
# Posted on: 25-Feb-2007 16:31:10   

Suppose i have a table named t with (f1, f2, f3, f4) fields.

I want to run a query like this :

SELECT f1, f2, f3, f4 FROM t WHERE (f4 = SELECT MAX(f4) FROM t WHERE f1 = 1 AND f2 = 2 AND f3 = 3) AND f1 = 1 AND f2 = 2 AND f3 = 3)

Note : The condition for two SELECT commands is the same.

How can I create an expression in LLBLGen?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 25-Feb-2007 18:48:13   

How can I create an expression in LLBLGen?

You can do that usign FieldCompareSetPredicate. simple_smile Review the Help Section Generated code - The predicate system - Adapter - FieldCompareSetPredicate and thread http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=9092

Note : The condition for two SELECT commands is the same.

Not exactly. The subquery filter must be aliased (the same table is used twice in the query). You will need one filter to subquery and another to the query itself.

David Elizondo | LLBLGen Support Team