Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need advice on SQL
Message
De
17/09/2006 09:51:13
 
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:
01154440
Message ID:
01154465
Vues:
9
>
>SELECT Program.Numero,MIN(Video.Numero) AS FirstVideo ;
>  FROM Program;
> INNER JOIN Video ON Program.Numero=Video.NoProgram;
> WHERE Program.Numero = TheProgramYouWant ;
> GROUP BY Program.Numero
>
This would not work because not all videos of a program could be part of the result. Thus, if the user only purchased the 2nd and 3rd video of the program, I will not be able to extract the first one of the program by the use of MIN() as it will not be part of the INNER JOIN.

Sergey and Fabio suggested two approaches that should work. I will check on those next messages next.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform