Filter rows using not like

How to filter dt columns that does not start with number 8…I tried filter table but getting 0 rows…number would be like"856543390".Also it. Says the column is of double type… How can I do this in linq ? Or any simple method

Can you tell what you have used in the filter datatable Activity before?
Can you share the screen shot

Hi,

How can I do this in linq ?

Can you try the following?

dt = dt.AsEnumerable.Where(Function(r) r("Column1").ToString.StartsWith("8")).CopyToDataTable()

Sample20210803-2.zip (2.5 KB)

Regards,

my condition here is “does not start with”

Hi,

How about the following?

dt = dt.AsEnumerable.Where(Function(r) not r("Column1").ToString.StartsWith("8")).CopyToDataTable()

Regards,

1 Like

You have asked for does not starts with “8”
In screenshot it is “1”? Whether you need this condition also ?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.