Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unexplained value in SQL field
Message
From
09/10/2006 12:03:00
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Unexplained value in SQL field
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01160578
Message ID:
01160578
Views:
56
I have a SQL command like this:
SELECT Video.Numero,Video.Active2,Video.DateR,Video.Notes_E,Video.Notes_F,Video.Running,Video.VideoT,Video.NoVideoT,Masters.FirstName,;
 Masters.LastName,Video.NoVideoL,Video.NoMaster,Video.NoMaster2,Video.NoMaster3,Video.NoMember,;
 VideoType.Title_E AS VideoType,VideoLanguage.Title_E AS VideoLanguage,Programs.ProgramT,Video.NoProgram,;
 IIF(ISNULL(Member.NoSchool),0,Member.NoSchool) AS NoSchool,School.SchoolT,Video.NoClass,;
 VideoClassification.Title_E AS Classification,Video.Url,School.Url AS SchoolUrl,VideoSize.VideoSizeT,;
 Video.NoMember2,Member2.FirstName,Member2.LastName;
 FROM Video;
 INNER JOIN Masters ON Video.NoMaster=Masters.Numero;
 INNER JOIN VideoType ON Video.NoVideoT=VideoType.Numero;
 INNER JOIN VideoLanguage ON Video.NoVideoL=VideoLanguage.Numero;
 LEFT JOIN Programs ON Video.NoProgram=Programs.Numero;
 LEFT JOIN Member ON Video.NoMember=Member.Numero;
 LEFT JOIN School ON Member.NoSchool=School.Numero;
 INNER JOIN VideoClassification ON Video.NoClass=VideoClassification.Numero;
 INNER JOIN VideoSize ON Video.NoVideoSiz=VideoSize.Numero;
 LEFT JOIN Member AS Member2 ON Video.NoMember2=Member2.Numero;
 WHERE Video.Active2 AND Video.DateR<={^2006/10/09 07:46:15}
As is, the result in the NoSchool field would be having a size of one for the NoSchool field. Thus, I end up with some * in some records because I have values higher than 9 in some records.

However, if I remove the second part of the where clause, which is the Video.DateR filter, the NoSchool field would then be ok.

Can someone explain me that where behavior?
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
Next
Reply
Map
View

Click here to load this message in the networking platform