I need to select the rows of a table where a column value is numeric, any Help?
EDIT: I have a varchar column and I need to select the ones that are numbers and the
SqlFunctions.IsNumeric
http://msdn.microsoft.com/en-us/library/system.data.objects.sqlclient.sqlfunctions.isnumeric.aspx
For example:
private int GetLastGoodNumber(string PartNum)
{
return (from row in Db.SerialNo
where
row.PartNum == PartNum
let nullable = System.Data.Objects.SqlClient.SqlFunctions.IsNumeric(row.SerialNumber)
where nullable != null
select nullable.Value).Max();
}