on 02-16-2015 9:44 PM
How to delete duplicate records using HANA SQL statement where multiple fields are grouped as keys
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nablan,
1) Select the distinct records into a New Table
CREATE COLUMN TABLE "schema"."new"
LIKE "schema"."old";
SELECT DISTINCT *
FROM "schema"."old"
INTO "schema"."new";
2) Delete the records from Old Table
DELETE FROM "schema"."old"
3) Insert New table data back in to Old Table and drop the New table.
INSERT INTO "schema"."old" SELECT * FROM "schema"."new";
DROP TABLE "schema"."new";
Cheers,
Safiyu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.