I have data imported from an excel sheet into a table in db.
Now the data provided in excel sheet consists of multiple records having all except one column value different.
I need to delete one of the two.
Below is my sample data…
I need to delete the one with null in “variant” column
INDEX_NUM || variant || CASE_PACK ||cases || units
1020 144 0 0
1020 null 144 1 116 ------- > TO DELETE
1020 xyz 144 1 116
Data is the excel sheet itself is incorrect…It has multiple rows for same data just difference in variant.
I have got the data in my db.
Now i wan delete that row amongst the two havin variant as null
I cant use HAVING COUNT(VARIANT) >1 as there are other rows which are currect, but which also have multiple variants.
So i need to ignore variants beginning with DP and BD.
I hope this is clear…
You can try