How can I exclude deleted records in a special 2-table query?
for example:
Select cc.lastname, tt.invoicetot from customers cc, transactions tt
where cc.custnum = 12345
The VFP transaction table has some deleted records that haven't
been "packed"...I want to exclude them from the query.
Can you suggest a technique that is supported by your DBF driver?
Thanks
|
as further explanation:
I am using ColdFusion and have set the datasource to
include deleted records (yields MUCH faster performance
on most queries...but, causes a problem on the occasional
lookup query where we have deleted records.)
Is there a way to temporarily change the setting on
Set Deleted, for just a single query?
Thx Paul
|
You can use deleted function,
DELETED([cTableAlias | nWorkArea]): returns a logical value that indicates whether the current record is marked for deletion.
For instance, where deleted('atable')=false
where not deleted('abc')
|
Select cc.lastname, tt.invoicetot from customers cc, transactions tt
where cc.custnum = 12345 and not deleted('customers')
|