USE THIS QUERY IT WILL WORK.Not if there are different twyindexes for the same id. Don't assume things like that. You will just get a random twyindex: hardly very safe!
update twypoly t1 set t1.twyindex=(select distinct twyindex from twyinfo t2 where t2.id=t1.id and rownum=1);
don123 wrote:So, the data can't be used as it is. It probably needs cleaning up so there is only one row for each id
distinct in subquery is not useful.
twyindex is different for duplicate rows.
don123 wrote:If the business says duplicates are allowed you have to ask the person who wants this, which of the different twyindexes they want to use
hi paul, thanks...
the duplicate data existing because of business logic.
can i use the SQL mentioned above for all cases ??
is it mandatory to remove duplicates ??
please provide your suggestions..