>>The DELETED() function with an alias will not work in a SQL SELECT statement.
>
>Correct me if i'm wrong, but this function runs well in SQL-SELECT statement. Maybe you're referring to another application of the function. If you're referring to a CLIENT-SERVER setup, (i.e. Data from SQL-SERVER), it will not work cause there's no function as DELETED(). And when you execute a command to delete a specific record, it automatically remove it physically. Unlike the local database, the only way to remove the record physically is by issuing a command "PACK" or "ZAP".
No, you can not use a DELETED('alias') reference in a SQL select statement. You can use a DELETED() reference as long as there is only one table involved in the SELECT.
SELECT * FROM junk WHERE DELETED('junk')
will return no records, even if there are records marked for delete, where:
SELECT * FROM junk WHERE DELETED()
will return deleted records.