Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filter for !deleted in a view
Message
From
07/10/1997 18:04:06
 
 
To
07/10/1997 17:55:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00053605
Message ID:
00053607
Views:
21
>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 Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform