why didn't you say that in the first place :)
Based on the code, it looks like you're appending all the data each time, so I'd expect this error.
e.g.
first time ever - append 3 records
second time - 3 new records - appending 6 records - but 3 were already appended so you get the error
You need to add some code to make sure you're getting new records only.
e.g, Here's one way to do it
insert into targetTable ;
select * from sourceTable ;
where sourceTable.id not in ( ;
select id from targetTable)
select * from sourceTable ;
where sourceTable.id not in ( ;
select id from targetTable) ;
into cursor cutmp
select targetTable
append from dbf("cutmp")
>Thanks
>
>But i see the same error : Uniqueness of index ... is violated .
>
>Any ideia ?
>
>Thanks
Insanity: Doing the same thing over and over and expecting different results.