471,348 Members | 1,358 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,348 software developers and data experts.

Filtering rows from DataTable

Hi All,
I've a DataTable with one column as PhoneNumber. The phone number is
stored as
(111) 222-3333. I need to filter the DataTable. the filter expression
could be 1112223333 or 2233 or 112. Any of these search critera should
filter the phone number

i need to perform filter like this
System.Data.DataRow[] objDataRows = objTable.Select("PhoneNumber like
'1112223333');
or
System.Data.DataRow[] objDataRows = objTable.Select("PhoneNumber like
'23333');
or
System.Data.DataRow[] objDataRows = objTable.Select("PhoneNumber like
'1122');

I need to format the PhoneNumber column. Like before searching i need
to convert phone number from (111) 222-3333 to 1112223333

Is there any way to format the column before searching ??? I expect a
statement like this
System.Data.DataRow[] objDataRows =
objTable.Select("Format(PhoneNumber) like '1122');

Please help me to sort out this problem.

Thanks in Advance
-ArunDhaJ
Jun 27 '08 #1
0 762

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Alex Ayzin | last post: by
5 posts views Thread by TA | last post: by
2 posts views Thread by Darren Clark | last post: by
1 post views Thread by Jason | last post: by
3 posts views Thread by Craig G | last post: by
3 posts views Thread by Shahriar | last post: by
5 posts views Thread by DBC User | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.