Hi Dear All I have a table which have Duplicate (or you can say that repeating) record in each date.
I just want to delete each duplicate record from each date,
how its happened is due to Cross Join Please Help me Its looks like this..
Suppose Table Named is PRODUCT and its column names are like ID and DATE1
ID DATE1 typ
------------------------------------
100 01-01-2021 A
101 01-01-2021 B
102 01-01-2021 C
100 01-01-2021 A
101 01-01-2021 B
102 01-01-2021 C
100 01-01-2021 A
101 01-01-2021 B
102 01-01-2021 C
In above each ID is repeating every time. I just want to delete each id which is duplicate.
100 01-01-2021 A
101 01-01-2021 B
102 01-01-2021 C
We applied this
delete from your_table a
where a.rowid > (select min(b.rowid)
from your_table b
where b.id = a.id
and b.date1 = a.date1
);
But results show me like this
100 01-01-2021 A
101 01-01-2021 B
102 01-01-2021 B
Or some times it shows C,C,A or some times A,A,C I know there is all data with all possibilities so how can filter just which we just keep table original data how I am working on it is like I have 3 table one have data like
100 01-01-2021 A
101 01-01-2021 B
102 01-01-2021 C
100 10-01-2021 B
101 10-01-2021 C
102 10-01-2021 A
100 20-01-2021 C
101 20-01-2021 A
102 20-01-2021 B
One table have data like dates
01-01-2021
02-01-2021
03-01-2021
04-01-2021
05-01-2021
I want all dates till the next start it appeares all date with same data as like
100 01-01-2021 A
101 01-01-2021 B
102 01-01-2021 C
100 02-01-2021 A
101 02-01-2021 B
102 02-01-2021 C
100 03-01-2021 A
101 03-01-2021 B
102 03-01-2021 C
---
100 10-01-2021 B
101 10-01-2021 C
102 10-01-2021 A
100 11-01-2021 B
101 11-01-2021 C
102 11-01-2021 A
So on so I tried cross join but cross join make each and every rows to make all possibilities so I tried to dell all other dates to be delete that each day get there only ids but know it shows like that how can i get over this please hep me about this regards to all