SQL query _ Remove Duplicate

I want to remove duplicate from Column Booking No after sorting. I have done the sorting part but can’t figure out how to delete duplicate.

Thanks in advance

hey

you need to delete those rows in your internal datatable in uipath, or in your database using a query?

regards

1 Like

in uipath. I am using Execute query activity

image

Try with this

newDT = yourDT.DefaultView.ToTable(True,"Booking No", "Component Start")

Regards!

@ravindar.singh Can you let me know the expected output

HI @ravindar.singh ,
The query is correct and returned distinct values. as per the code you have used distinct for both Booking No & Component Star columns.

Let me know the expected output will change in SQL query

Regards,
Arivu

Sorry this didn’t work

Hi @arivu96 - Outcome I want is 1 row from each booking No after sort