Aggregate MAX on Date Field?

Posts   
 
    
Landon
User
Posts: 8
Joined: 16-Feb-2005
# Posted on: 30-Jun-2005 23:26:53   

I'm having a difficult time figuring out exactly how to perform the following query using the generated code. It involves using MAX() on a date field, which I'm not sure is even allowed. Any help would be much appreciated:

select count(*) from LogTable where userID = 1193791 
and LogDate > (select MAX(VisitDate) from Visit where userID = 1193791)
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 01-Jul-2005 09:46:46   

It's early, but I think it should be possible with a FieldCompareSetPredicate and where you add the AggregateFunction.Max aggregate to the setfield and use SetOperator.GreaterThan.

Frans Bouma | Lead developer LLBLGen Pro