Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filters in a view
Message
 
 
À
08/10/1999 11:32:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00274272
Message ID:
00274299
Vues:
31
>I am trying to create a view that has two behaviors.
>
>The view is based on two tables. The underlying SQL will retrieve only those records in which there is a match between the two tables. That is, if there is a record in one table that does not have a corresponding match in the other, then it will not be pulled. The two tables are joined on a Primary/Foreign key combination.
>
>Including a UNION SELECT I can obtain the non-matched records. I have to use the macro technique to create the view rather than use the view designer since the view designer is weak.
>
>My problem is that when I call the view I would like an option that I can set at run-time to ask for just the non-matched records or all of the records. I cannot think of any way to do IF testing in a view.

Use 2 views. I do the same where I have 2 views but only 1 is in use at a time in a form with a private DS. When I open either view, I alias the view with same alias regardless of the view name. That way I do not have to change the ControlSource of any of the form controls.
if SomeLogicalCriteria
   Use MyView1 alias MyView
else
   Use MyView2 alias MyView
endif
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform