Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multi-layered Views and Indexes
Message
De
28/11/1997 13:56:54
 
 
À
28/11/1997 11:59:06
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00062729
Message ID:
00062746
Vues:
29
>Hi all!
>
>I'm trying to play with views again and am stumbling at the moment.
>
>I basically have 2 types of tables in my database, data tables and a code/display value table. I'm trying to create views to use as the source for some grids on my forms.
>
>I have one "master" code/display value table whose structure is:
> codetype (to diffentiate the groups of 'codes' for comboboxes)
> codeno (unique 'meaningless' key)
> displayvalue
>
>It was recommended to me that I first create views for each type of code in my "master" code/display value table by putting the code/display value table in each view, then filtering by codetype (=apples, oranges, bananas, etc.) and ordering by display value so the comboboxes of display values are in alpha order for my users. The result are views such as ViewApples, ViewOranges, ViewBananas which just displays the codenos and display values for types of apples, oranges, bananas etc..

why don't you use a single parameterize view?
e.g.
CREATE SQL .. SELECT... where Codetype=?tCodeType


>It was then suggested I index each of these code type views on the codeno(key field) so I can then relate these views to my data tables.
>
>The final step is to create a view for a particular grid, eg. "Joe's Fruits" with a data table with a structure like:
> * codeno_for_appletype
> * number_of_apples_sold
> * codeno_for_orangetype
> * number_of_oranges_sold
> * codeno_for_bananatype
> * number_of_bananas_sold
>and then add the appropriate codetype views for appletype, orangetype and bananatype to the final view and relate them to the data table.

why not create a view on your original "Master" and "data" tables that will give you the final resultset
why do you create an intermidiate view and then try to index and relate views?

Arnon
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform