Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange SQL result
Message
From
04/01/2005 14:21:03
 
 
To
04/01/2005 14:19:33
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00974162
Message ID:
00974168
Views:
24
yes, same result (I had just answered that to Greg)

>Have you tried to tell WHICH table will have the deleted records?
>SELECT claims.claimno,links.startdate,claimnt.lname,statute.statgrp_id,links.link_id  FROM claims;
>left JOIN links ON claims.claim_id=links.parent_id;
>left JOIN claimnt ON links.child_id=claimnt.claimnt_id;
>left JOIN statute ON links.statute_id=statute.statute_id;
>where links.ltype="CLCT" AND claims.claim_id=49142 ;
>AND NOT DELETED('links')
>
>
>
>>I am using the following code:
>>
>>
>>SELECT claims.claimno,links.startdate,claimnt.lname,statute.statgrp_id,links.link_id  FROM claims;
>>left JOIN links ON claims.claim_id=links.parent_id;
>>left JOIN claimnt ON links.child_id=claimnt.claimnt_id;
>>left JOIN statute ON links.statute_id=statute.statute_id;
>>where links.ltype="CLCT" AND claims.claim_id=49142 ;
>>AND NOT DELETED()
>>
>>
>>it returns 6 records instead of 2 (4 are deleted in the links table)
>>I thought and not deleted would eliminate deleted records???
>>
>>Claimno Startdate Lname Statgrp_id Link_id
>>200400014 / / Hypolite 310 380438
>>200400014 09/07/04 Muehlfeld 306 1391281
>>200400014 11/13/04 ABBAGNARO 0 1391311 deleted!
>>200400014 11/13/04 ABBATE 0 1391312 deleted!
>>200400014 11/18/04 306 1391320 deleted!
>>200400014 11/18/04 306 1391321 deleted!
>>
>>
>>What am I doing wrong??
>>
>>Peter
Peter Cortiel
Previous
Reply
Map
View

Click here to load this message in the networking platform