Hi ,
I am working on a script currently to remove duplicate records from database,
There are some conditions with this as follows:
Suppose the table looks like:
ID Name A/C No exp_date
1 xxx 168 12may2014
2 xxx 0 0
3 xxx 168 12may2014
etc…
So first i need to check if duplicate exists:
if yes
chcek if A’C no is not null or exp_date>=currentdate, if foolows the condition keep this entry and delete the othere entry.
if two same entries havve same A/CNo and exp_date then keep the max_id and delete lower1.
Hope i am able to put my query clearly.I need it urgently …Please help.