sql - Removing Duplicate Rows From Advantage Database Server 10.1 Table -
i have large dbf table in ads may contain duplicate records. duplicate record identified record field2, field3, field5, field4, field8 , field7 match record. need identify duplicate records , delete them. accomplish i'm trying write set of records second table. though duplicate record identified 6 fields, need write entire record, 30 fields, second table. have tried following code:
insert table2 select * table1 ( field2, field3, field5, field4, field8, field7 ) in ( select field2, field3, field5, field4, field8, field7 table1 field3 not '%foo%' , field3 not '%boo%' group field2, field3, field5, field4, field8, field7 having count(*) > 1 )
ads error message: error in script: poquery: error 7200: aqe error: state = 42000; nativeerror = 2115; [ianywhere solutions][advantage sql engine]expected lexical element not found:) there problem parsing clause in select statement.
any , appreciated.
as long have alternate table available columns, should with...
insert table2 ( field2, field3, field5, field4, field8, field7 ) select field2, field3, field5, field4, field8, field7 table1 field3 not '%foo%' , field3 not '%boo%' group field2, field3, field5, field4, field8, field7 having count(*) > 1 )
Comments
Post a Comment