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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -