How to use aggregate function in predicate?!

Posts   
 
    
Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 09-Aug-2006 12:31:18   

I want to fetch an entity by DataAccessAdapter.FetchEntityUsingUniqueConstraint() to get result of the following sql statment. How can I write the code to fecth it?! Thank you very much!!!


Select Top 1 *
From Customer
Where Customer.Balance = (Select Max(Customer.Balance) From Customer)

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 09-Aug-2006 14:15:20   

I don't understand what your query should do, since it is not runnable. Try to run it against your database.

Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 09-Aug-2006 14:30:25   

Sorry for typing mistake, I've revised my last message.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 09-Aug-2006 14:41:58