I’m trying to extract all rows from a datatable where “CODE” follows the pattern “Z##A”. I tried the following to no avail:
Dim floods() As DataRow = arqTable.Select("mid(code,1,1)='Z' and isnumeric(mid(code,2,2)) and mid(code,4,1)='A'")
An error returned
“The expression contains undefined
function call mid().”
I could go through the rows using a FOR EACH loop but I’m just curious if there is a way to simply use the datatable select function.
*Edit: BTW, using “code like ‘Z%A'” is not going to work as I’m specifically looking for Z[number][number]A and not ones with Z[letter][letter]A.
This one works
If your at all concerned about efficiency check out this quick example as a point of interest from a performance perspective. (paste into a console application).
Results…
Code