Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with a query
Message
De
21/12/2006 05:45:06
 
 
À
21/12/2006 02:59:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01179447
Message ID:
01179477
Vues:
7
This message has been marked as the solution to the initial question of the thread.
How about something like...
SELECT semen.idmare,semen.identification,;
       cv_gender.name as namemare,;
       cv_name.name as namehorse,;
       semen.value;
FROM semensales semen;
JOIN cv cv_name ON semen.identify=cv_name.idfield;
JOIN cv cv_gender ON semen.idmare=cv_gender.idfield;
ORDER BY semen.idmare,semen.identify
>The problem is that i have two IDs in the table SEMENSALES pointing to the same id on table CV, let me explain you with this example:
>
>in table SEMENSALES:
>IDMARE IDENTIFICATION SEMENVALUE
>1 3 15
>1 4 30
>2 3 10
>
>In table CV
>IDENTIFICATION NAME GENDER
>1 LAMA MARE
>2 CHICA MARE
>3 PEPE HORSE
>4 LOCO HORSE
>
>
>the querie output should be:
>IDMARE IDENTIFICATION NAMEMARE NAMEHORSE SEMENVALUE
>1 3 LAMA PEPE 15
>1 4 LAMA LOCO 30
>2 3 CHICA PEPE 10
>
>
>thanks .
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform