Unique values from data table

Hi Team,

I have a input from excel (data table)in below format.

eid ename jobid age
1 rama 1234 12
2 seetha 2345 11
3 raja 1234 10
4 dev 2345 40
5 tej 6789 23

i want output like for each unique job id the eid values

THANKS

Hi @rpadev,
you can use defaultview for fetch unique id

dt=dt.defaultview.totable(True,“ColumnName”)

Thanks,
P.Ajithkumar

Thanks …and also with that unique id i want to get job id

please helpout here

Hi @rpadev ,
Datatable.DefaultView.ToTable(True,“jobid”) save to datatable

hi,

tried the same way but it didn’t worked our.

taken one assign activity

Hi,
use one assign activity store the value as datatable. If u need workflow i will send tomorrow

Thanks

@rpadev

Let us take you are having a datatable dta

Now Create one more datatable variable dtb

Use one assign Activity

dtb= (From p In dta.Select
        Group p by jobId=Convert.ToString(p("jobid") Into GroupA=Group
        Select GroupA(0)).ToArray.CopyToDataTable.DefaultView.ToTable(False,"eid","jobid")

Now dtb will Contain only distinct job ID and their eid values.

Regards,
Mahesh