Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error variable is not found
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01205969
Message ID:
01205983
Views:
13
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform