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
Open up your DBML (LINQ-to-SQL) file in an XML editor, go down to the end of the file and paste this just before the '' node:
Now, you can use the already-in-SQL function called "ISNUMERIC". Here's how:
var blah = myDataContext.Accounts.Where(account=>
myDataContext.ISNUMERIC(account.ID) == true);
There you go :)
You may also find these functions useful to copy: