find max numeric value with LINQ

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    find max numeric value with LINQ

    Here is my vb code, it keeps returning 999 even though my max value is 1264?

    Dim dbInv As New DataCustomerDat aContext
    Dim inv = (From s In dbInv.ARIentrie s _
    Where s.OwnerID = hfOwnerID.Value _
    And s.Disabled = False _
    And Linq.SqlClient. SqlMethods.Like (s.InvoiceNumbe r, "%[0-9][^A-Z][^a-z]") _
    Select s.InvoiceNumber ).Max



    Thanks John


Working...