Max Int-value from String-column

Posts   
 
    
jwijnker
User
Posts: 32
Joined: 09-Mar-2011
# Posted on: 21-Jun-2012 10:43:03   

Hi all,

I'm trying to get the max Int-value of a String-column to generate a new 'customId'. Unfortunatly i get the error: "(Parse(EntityField(LPLA_1.cId AS cId)) > 0)" while using the query: "int newcId = queryAdapter.FetchTenantEntityList<CustomerEntity>().Where(c => Int32.Parse(c.cId) > 0).Max(c => l.cId).First() + 1;"

Can you help me finding the correct way to do this??