How can I filter the count col whose values ranges between 20k to 40k?(>20k and <40k)

By using select Method…Count col =>20k and <40k

Hello @aparna30
if count column’s data type is string then use below
dtInput.Select("convert([count],'System.Int32') > 20000 and convert([count],'System.Int32') < 40000").Count

and if datatype in integer then use below
dtInput.Select("[count] > 20000 and [count] < 40000").Count

Hi @aparna30 ,

You could try the below Expression as an alternate :

DT.AsEnumerable.Where(Function(x)CDbl(x("Count").ToString)>20000 andAlso CDbl(x("Count").ToString)<40000).CopyToDatatble

Let us know if you get any errors.