Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error variable is not found
Message
 
 
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
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01205969
Message ID:
01205983
Vues:
12
Your code compiles w/o errors which means that one of the fields you're referincing in the query doesn't exist in the tables.
There's no good reason to use RIGHT JOIN. You can use LEFT JOIN by swapping tables.Also, applying WHERE conditions to the table that may not have matching records effectively kills outer join. Such conditions should be moved into join conditions.

>what is mistake in this sql
>
>
>SELECT Student.*, Examtran.*;
> FROM ;
>     student ;
>    RIGHT JOIN examtran ;
>   ON  Student.code = Examtran.code,;
>  (Cast(Sum(obt01) As I)) /Count(code)  As CW,;
>	(Cast(Sum(obt02) As I)) /Count(code)  As HW,;
>	(Cast(Sum(obt03) As I)) /Count(code)  As Calli,;
>	(Cast(Sum(obt04) As I)) /Count(code)  As Clean,;
>	(Cast(Sum(obt05) As I)) /Count(code)  As Presence;
>	WHERE year=2006 AND bex=2.and.Student.admtd = 1;
>		GROUP By lcode,Sec,code;
>	order By lcode,sec 
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform