Try a SQL UNION with the first select :
where not deleted()
and the second select :
where deleted()
Glenn
>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