Filter row by the character is starts with

I would like to filter rows by the start character to be ‘A’.

I would only want the apple and accrison as the output… How may I go about doing so?

Thank you xoxo

@sangasangasanga Use below statement. You will get result as dataTable based on ur variable.

UrDataTableVariable.Select("[UrcolumnName] Like’A%’").CopyToDataTable

Hi is there any other way. I would like filter first then add to dt

@sangasangasanga In for each row of datatable, Get value from required column, using if condition check first letter has required alphabet, If condition is true add row to new datatable otherwise loop go to next and process repeat.

Seems workable. But i need your help, this code doesn’t work for the if condition
row.Select(“Like ‘G’%”)

@sangasangasanga In if condition dont use below condition

row.Select(“Like ‘G’%”)

@Manjuts90 hmm what condition can i use?


Below condition is simple than other method Bro

UrDataTableVariable.Select("[UrcolumnName] Like’A%’").CopyToDataTable

1 Like

There are another option available, you can use a IF condition and put there

Thanks & Regards
Bagish Ojha