Filter Datatable


I am having following issue, an reading data from excel and saving it as Datatable, now using that datatable i want to execute a full sql query. Like in execute query activity we will pass the whole query as string similar to that how can we do that?.

You mean you want to pass the data in the datatable in a single query?

Or do you want to run a query for each row in the datatable?

Using that new extracted datatable i want to filter data using this query

Select Id, case when dtk1 = lag(dtk1,1) and dtk2 = lag(dtk2,1) and dtk3 = lag(dtk3,1) and dtk4 = lag(dtk4,1) then id + ’ ’ + lag(Id,1) Else ID end as ConcatenatedID, DTK1,DTK2,DTK3,DTK4
From table1
Order by id

How can i do that?

yes in single query