I have a sql querry can any1 help me how to use that as datable.select

1 Like

@darshan

Welcome to the UIpath Community.

Try like this:

YourInputDT.Select("[Column1] = ‘Value’ AND [Column2] = ‘Value’…").CopyToDataTable

1 Like

I got to know how to filter but i am getting extra columns in the new filtered data table can any1 suggest me how to select only particular column from the filtered data table

@darshan,

Please find one sample
(From row In DataTable.Select Where (row(0).ToString.Trim.Equals(“CCC”) or row(0).ToString.Trim.Equals(“AAA”) ) Select row).ToArray.CopyToDatatable()

Thanks fr the sample. I’ve to select 3 different columns based on the values in one of the column. Fr ex
Name. City. Language age sex
Janu. Bang. Kannada. 24. F
Manu. Mysr. Kannada. 25. M
Ganu. Delhi. Hindi. 26. M
Sanju. Bihar. English. 28. F

Here i come to know how to filter based on language column but i need the values of only name & city columns for parricular language

@darshan

After applying filter on dataTable and then use Dataview on that read specific columns.

DataView view = New DataView(youtFilterDT)

newDT = view.ToTable(True,“Name”,“City”)

1 Like

Thnku lakshman worked as expected

1 Like

@darshan

Could you please close this thread by marking my above post as solution.