>hi,
>
>i don't have pk,becuse i get this data from excel sheet every 3 months,
>convertit to vfp.dbf.
>and most of fields duplicated ,
>
>delete from table1 where table1.pk in (select Pk from crsRand)
>
>
>thanks.
>m.qasem
Ok, when you need to use recno() as your identifier. When you select records from table1 add recno() as RecNum into the field list. Do it for crsRand. Then your delete command would be
delete from table1 where recno() in (select RecNum from crsRand).
This is not a good approach, because using recno() is not recommended in Select-SQL. But I do not see a better alternative in your case.
You need to make necessary code adjustments by yourself. Let me know, how does it work for you.
If it's not broken, fix it until it is.
My Blog