Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why I'm getting "column not found" error?
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01190239
Message ID:
01190244
Views:
24
This message has been marked as the solution to the initial question of the thread.
>I am getting error"Columan "exmcode" is not found under this sql
>
>
>SELECT Exam.code as exmcode, Exam.descr, Exam.fmdate, ;
>Exam.year, Exam.change1, Exam.sno,;
>  Exam.nmonth, Exam.bex, Exam.begdate, ;
>Student.code as zcode, Student.descr as zname,;
>  Student.fname, Student.sex, Student.sec, ;
>Student.lcode, Student.scode,;
>  Student.broll, Student.path;
> FROM student,;
>     exam;
> ORDER BY Exam.exmcode;
>         WHERE student.scode=thisform.scode.value;
> .and. student.lcode=thisform.lcode.value ;
and student.sec=thisform.sec.value.and.student.admtd=1;
>.and. Exam.exmcode=thisform.code.value;
>into cursor new
Put Order by 1 instead. You can not use new (created) names in ORDER BY clause.

Also, AFAIK, it's better to use local variables rather than thisform properties in SQL. At least I always try to stick with this rule.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform