Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote View Error
Message
From
17/02/2007 21:45:03
 
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 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01196851
Message ID:
01196882
Views:
5
Thanks! The view is working now but the results still include some unwanted records. I added the "NOT INLIST(ALLTRIM(Status_codes.cDescription),'Cancelled','Withdrawn','Inactive')" condition remove the status I didn't want. However I obviously have something wrong because now no records are being returned. What is the correct way to do this?
SELECT Assessors.cFax,;
       Audits.cCert,;
       Customers.cCompany,;
       Audits.dAuditSched,;
       Audits.cAudit_Types,;
       Audits.cAudSubType,;
       Standards.cStandard,;
       Standards.cStndDate,;
       Customers.cPCity,;
       Customers.cPState,;
       Audits.cAuditID,;
       Assessors.cLast_Name,;
       Assessors.cFirst_Name,;
       (RTRIM(clast_name)+', '+cfirst_name),;
       Audit_team.cInitials,;
       Audit_team.cJob,;
       Audit_team.dStart,;
       Audit_team.dEnd,;
       Audit_team.nAudit_Days,;
       Employees.cName,;
       Status_codes.cDescription;
	FROM dbo.Audits Audits;
		LEFT OUTER JOIN dbo.Registration Registration;
			ON Audits.cRegistration_cId = Registration.cId;
		LEFT OUTER JOIN dbo.Status_Codes Status_codes;
			ON Registration.cStatus_Codes_cid = Status_codes.cId;
		LEFT OUTER JOIN dbo.Employees Employees;
			ON Registration.cResponsible = Employees.cId;
		LEFT OUTER JOIN dbo.Audit_Team Audit_team;
			ON Audits.cAuditID = Audit_team.cAuditID;
		LEFT OUTER JOIN dbo.Assessors Assessors;
			ON Audit_team.cAssessors_cId = Assessors.cId;
		LEFT OUTER JOIN dbo.Standards Standards;
			ON Audits.cAudStd_cid = Standards.cid;
		LEFT OUTER JOIN dbo.Customers Customers;
			ON Registration.cCustomers_cid = Customers.cId;
	WHERE (Audits.dStart >= getdate() OR Audits.dStart IS NULL) AND;
	    NOT INLIST(ALLTRIM(Status_codes.cDescription),'Cancelled','Withdrawn','Inactive') AND;
		Assessors.cId = ( ?VP_Assessors_cId )
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform