Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT SQL Statement
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00506284
Message ID:
00506364
Vues:
17
>>I have two tables with the following structures:
>>
>>Table1:
>>DivisionName C(30)
>>Access N(1)
>>
>>
>>
>>Table2: Contains information on all divisions
>>DivisionId N(5)
>>DivisionName C(30)
>>Address C(50)
>>Etc....
>>
>>What I want to do is gather the DivisionId's for only the DivisionName's listed in Table1.
>>
>>I tried "Select DivisionId FROM Table2 INTO CURSOR tmpCursor WHERE table1.DivisionName = table2.DivisionName" but this does not seem to work.
>>
>>What am I doing wrong?
>>
>>Thanks in advance for your help,
>>Russell Clendenon
>
>Select Table2.DivisionId FROM Table1, Table2
>Where Table2.DivisionName = Table1.DivisionName
>Into Cursor TmpCursor
>
>Would the above work?
Alternatively,
SELECT DivisionID FROM Table2 WHERE ;
DivisionName IN ;
(SELECT DivisionName FROM Table1)

In my opinion, this is preferable because you don't
have to qualify the field names with the table that
they belong to.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform