Forum Discussion
Remove duplicates in direct query
- 9 years ago
Are you using a "union" or "union all" in your query to combine the data from two tables into one? If so, the difference between UNION and UNION ALL is that UNION ALL will bring back all records regardless and a UNION effectively does a SELECT DISTINCT on the results set. If you are querying one table, then a SELECT DISTINCT will get unique records from this table.
- 8 years ago
Since you are under Direct Query mode, any transform step which can modify the source table structure is not allowed in Query Editor. So for your requirement, please custom a query and use DISTINCT keyword to remove the duplicate rows.
Regards,
Are you using a "union" or "union all" in your query to combine the data from two tables into one? If so, the difference between UNION and UNION ALL is that UNION ALL will bring back all records regardless and a UNION effectively does a SELECT DISTINCT on the results set. If you are querying one table, then a SELECT DISTINCT will get unique records from this table.