Comparing aggregate fields

Posts   
 
    
Tri-Focus
User
Posts: 2
Joined: 20-Jun-2010
# Posted on: 20-Jun-2010 05:47:22   

How would I write the following query in LLBLGen? (The WHERE clause is where I am having the issue) simple_smile ** I am using LLBLGen 2.5.

SELECT * FROM XXXX WHERE (Column1 + column2 < {some value})

This is the complete query

SELECT COUNT(*) TripCount FROM Trip WHERE Location_Id = @LocationId AND Departure_On = @TourDate AND (Departure_Time BETWEEN @TourTime AND (@TourTime + (@TourDuration-1)) OR (Departure_Time + Trip_Duration >= @TourTime AND Departure_Time < @TourTime)) AND Schedule_Position = @SchedulePosition

Thanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 20-Jun-2010 20:00:29   

Hi Tri-Focus,

You can achieve that with Expressions in predicates. Here is an example: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=16784&StartAtMessage=0&#93869

Hope helpful wink

David Elizondo | LLBLGen Support Team
Tri-Focus
User
Posts: 2
Joined: 20-Jun-2010
# Posted on: 21-Jun-2010 08:47:34   

Thanks, I will give is a shot. I appreciate the quick response to the question.