Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with a query
Message
From
21/12/2006 05:45:06
 
 
To
21/12/2006 02:59:28
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01179447
Message ID:
01179477
Views:
6
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 .
Previous
Reply
Map
View

Click here to load this message in the networking platform