Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filter for !deleted in a view
Message
From
08/10/1997 09:31:37
 
 
To
07/10/1997 18:04:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00053605
Message ID:
00053669
Views:
23
>>I asked this question a few months ago and managed to figure a way around the issue without an answer.
>>
>>I want to create a paramterized view that ignores deleted records. Basically, I have tried everything I know of and can't figure out how. Here one incarnation of the SQL from the view designer:
>>
>>SELECT somestuff
>> FROM temptest!convention INNER JOIN temptest!exhibconv;
>> INNER JOIN temptest!exhibitor ;
>> ON Exhibconv.ecexhibitnum = Exhibitor.exhibitnum ;
>> ON Convention.convnum = Exhibconv.ecconvnum;
>> WHERE Convention.convnum = ?m.convnum;
>> AND DELETED('exhibconv') = .F.;
>> ORDER BY Exhibitor.company
>>
>>What happens is that the query returns different results depending on where the record pointer sits in the table. (Deleted() isn't re-evaluated for every row, just once at the beginning of the query.)
>>So I tried:
>>
>>SELECT somestuff, deleted('exhibconv') as deadrecord
>> FROM temptest!convention INNER JOIN temptest!exhibconv;
>> INNER JOIN temptest!exhibitor ;
>> ON Exhibconv.ecexhibitnum = Exhibitor.exhibitnum ;
>> ON Convention.convnum = Exhibconv.ecconvnum;
>> WHERE Convention.convnum = ?m.convnum;
>> AND deadrecord = .F.;
>> ORDER BY Exhibitor.company
>>
>>Same results. SQL/VFP HAS to have provided for this, how do I do it?
>
>I had a problem with that as well as the view was being executed before the Load() event which sets my SET DELETE ON. So, in BeforeOpenTables(), I had to put SET DELETE ON as well.

Michel- I can't believe that it was that simple. I thought that SQL didn't respect the DELETED setting, so I didn't even take it into account. Thanks a ton for your suggestion.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform