Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with View ( Multiple Fields as primary key)
Message
De
13/06/1999 13:16:21
 
 
À
13/06/1999 05:52:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00229237
Message ID:
00229260
Vues:
12
Hi Tariq ---

This is known as a compound key. Are the fields in the parent that comprise the key reflected in the child table? If so, the following would work, assuming the child table has a completely unique primary key of it's own:

CREATE SQL VIEW myview AS SELECT parent.*,child.* FROM parent, child WHERE
parent.field_1 = child.field_1 AND parent.field_2 = child.field_2.

>We have two tables, the master table has a primary key i.e. Multiple of two fields. Now I want to create a view that consist of fields from both Master and child tables. But while designing a view the join condition have no option for multiple field.
>
>I am looking for a solution.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform