Hi all,
Here i have inserted Employee table using advance SQL, when i try to view data got some duplicate data so i just want to remove those data i have return query but i am getting error like below and i am new to this tool
Could you help me?
Thank you :)
Hi Aishwarya Patil,
Good Day!!
Please Create a Structure and use the structure to select the values from the table (your output aggregate and the select statement of your query has a mismatch).
Also you have missed a , before the count(*) in the above SQL,
if More clarification are needed please share OML.
FYI - Query I have used Output of the above Query -
Structure I have created
Thanks,Vignesh Prakash.
Thank you Vignesh Prakash
Hi @aishwarya patil
1.You need to create Structure As you want.
Hope it helps.
thanks
Karnika.K
Hi @Aishwarya Patil
You can use "Distinct" keyword in your Query to remove Duplicate values.
Thanks
karnika
Thank you Karnika-EONE for your suggestion, I have used that still i am getting duplicates
Thank you so much, now its working.
Hi Aishwarya,
You can please refer below discussion for remove duplicate record.
https://www.outsystems.com/forums/discussion/79807/duplicate-data/
CV
Thanks CV
Hi,
please create structure for those column (Employee table column )
and remove Execute Line 5.
Thanks,
Ramesh
Yes now its working Thanks for response.
SELECT EmployeeID, EmployeeName, EmployeeEmail, COUNT(*) OVER (PARTITION BY EmployeeName, EmployeeEmail) AS DuplicateCount FROM Employee HAVING COUNT(*) OVER (PARTITION BY EmployeeName, EmployeeEmail) > 1 ORDER BY EmployeeName, EmployeeEmail;
First all you have to identify id`s of duplicate records and then you have to pass those id`s to delete sql statement in sql.
Regards
Shashi Kant Shukla