Not able to fetch proper result with query

Can anyone help me fetching the correct result with query
I am using Execute query Activity and in Query field I am entering this query"SELECT ename FROM telusko1.emp where depto=10 or depto=20; "
It was supposed to result 5 names but it is returning System.Data.DataRow five times.

Hi @anmolk171 ,
The result of Execute Query activity will be a datatable. You have to loop through each row and retrieve the column value you want.
What you have done in the here is correct. Use row(0).ToString or row(“ename”).ToString or row.item(“ename”).ToString to get your column value in the Write Line activity.

@Madhavi Thanks for your help. It is working now

1 Like

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