What you're doing should work fine. What version of VFP are you using? Is the data buffered? Are you querying a view? Just grasping at straws here. :)
Others have given you workarounds....
>I am trying to build a cursor that includes deleted records. I set deleted off prior to the select and the deleted records are included in the result set, I want to include a flag of the deleted records, I have included the following in the select statement other_fields, IIF(DELETED(),1,0)as del but have not had any luck setting the correct value for this field. Does anyone know of a way to do this ? The data is being exported and has to have this flag set so that if the record is deleted after export it can be re-exported with the flag set.
>
>Thanks
>Ian
Steve Gibson