>This seems like it should work but it returns nothing (I know there are deleted records in Jan01 with matching Par01 records). SET DELETED IS OFF
>The object is to find all deleted Jan01 records that have a matching Par01 record. If I remove the DELETED(...) condition it returns all records.
>
>Any ideas or help is greatly appreciated.....
>
>
>SELECT Par01.nId, Par01.cName, Jan01.nId, Jan01.cDesc, Jan01.cCode ;
> FROM Par01, Jan01 ;
> WHERE Par01.nId = Jan01.nId AND DELETED("Jan01")
>
>
>Thanks
>
>Bob
The DELETED() function doesn't work dependably in multi-table SQL queries. Try first SELECTing all deleted records into a cursor, and then joining that cursor to the second table.
Erik Moore
Clientelligence