Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help on a view
Message
 
 
À
20/05/2001 12:41:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00509207
Message ID:
00509219
Vues:
22
Something like this:
create sql view windowsview as;
SELECT windows.iID, cWindowLetter,;
  nQuantity, nWidth, nHeight,;
  nCostPerSqFt, nPrice, lNameplate,;
  lProtectiveCovering, lLightbox, lFrames,;
  lFinalMeasurement, ;
  lCircular,;
  CodesStyle.cValue as cWindowStyle, ;
  CodesTop.cValue as cWindowTop ;
  FROM  windows ;
  INNER JOIN codes as CodesStyle;
     ON  windows.iStyle = CodesStyle.iID;
  INNER JOIN codes as CodesTop;
     ON  windows.iTopShape = CodesTop.iID ;
 WHERE windows.iProject = ?Projects.iID ;
 order by cWindowLetter
This readonly view joins the windows table to an overloaded lookup table codes twice, giving each instance it's own alias and using the alias to get the looked up field out of the table.
>i have a table in which there are several foreign-key fields containing code values from which i want to create a parameterised view. while the parameterised view is not a problem, i want to incorporate fields from other primary key tables into the view whose primary key matches the foreign key value of the table in question. pls. advise.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform