By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,263 Members | 1,574 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,263 IT Pros & Developers. It's quick & easy.

How select just numeric values in LINQ?

P: n/a
We have a table "Animal" that contains the column "AnimalNumber" with values
like these:

100001
100002
100003
1XAB
10E43ABC
11RU5V

Having letters in the value was done in the past. These days, it's just a
the numeric value.

How can I write a LINQ statement to select only the numeric values? E.g.:

100001
100002
100003

Thanks fror any help,
Ron

Mar 5 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I havent used linq but

you could try.
from number in numbers
where IsNumber(number)

write your IsNumber or use double.TryParse

Ronald S. Cook wrote:
We have a table "Animal" that contains the column "AnimalNumber" with values
like these:

100001
100002
100003
1XAB
10E43ABC
11RU5V

Having letters in the value was done in the past. These days, it's just a
the numeric value.

How can I write a LINQ statement to select only the numeric values? E.g.:

100001
100002
100003

Thanks fror any help,
Ron
Mar 5 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.