How to know if a field is numeric in Linq To SQL

前端 未结 7 1106
日久生厌
日久生厌 2020-12-15 11:18

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

7条回答
  •  我在风中等你
    2020-12-15 11:44

    You will not be able to do this with LINQ2SQL without loading all records on the client.

    I can suggest to create view or table-valued function with aditional calculated column and then filter your results with this column. Or execute regular SQL with DataContext.ExecuteQuery.

提交回复
热议问题