Quantcast
Channel: SCN: Message List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 8968

Re: Remove Duplicate products on HANA

$
0
0

Hey Sid I thought you were displaying.

 

Its generally SELECT DISTINCT all over.. Anyway,

What you can try is with sub queries in HANA SQL making use of ROW ID's. I have just tested the one below and it seems to give results.

 

DELETE FROM "Schema"."TEMP"

WHERE "$rowid$" NOT IN (SELECT id FROM (SELECT DISTINCT customer,MAX("$rowid$") as id FROM "Schema"."TEMP"

GROUP BY customer))

 

Check if this helps.

Caution : Make sure ur AUTO COMMIT is off. Try first with a temporary table .Play safe with delete

 

Regards

Avinash Raju


Viewing all articles
Browse latest Browse all 8968

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>