Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not all the records are showing

Status
Not open for further replies.

SheepDog

Programmer
Feb 4, 2003
232
0
0
US
I have a query that should list all the records with a yes for Recruiter_Selected yet they do not.
The main problem I am having is that this query worked great before and now it does not work at all without any changes made to it.


Here is the query;

SELECT DISTINCT People_Information.*, dbo_Recruiter_Contact_Prospect_Select1.Recruiter_People_Code_ID, dbo_Recruiter_Contact_Prospect_Select1.Recruiter_FName, dbo_Recruiter_Contact_Prospect_Select1.Recruiter_LName, dbo_Recruiter_Contact_Prospect_Select1.RecruiterAdd, dbo_Recruiter_Contact_Prospect_Select1.Recruiter_City, dbo_Recruiter_Contact_Prospect_Select1.Recruiter_State, dbo_Recruiter_Contact_Prospect_Select1.Recruiter_Zip_Code, dbo_ACADEMIC.CLASS_LEVEL, dbo_ACADEMIC.APP_DECISION, dbo_SemesterInfo.academic_session
FROM ((dbo_Recruiter_Contact_Prospect_Select1 LEFT JOIN People_Information ON dbo_Recruiter_Contact_Prospect_Select1.PEOPLE_ID = People_Information.PEOPLE_ID) LEFT JOIN dbo_ACADEMIC ON dbo_Recruiter_Contact_Prospect_Select1.PEOPLE_ID = dbo_ACADEMIC.PEOPLE_ID) LEFT JOIN dbo_SemesterInfo ON dbo_ACADEMIC.ACADEMIC_YEAR = dbo_SemesterInfo.academic_year
WHERE (((dbo_Recruiter_Contact_Prospect_Select1.Recruiter_People_Code_ID)=[Enter Recruiter ID]) AND ((dbo_ACADEMIC.APP_DECISION)<>"cx" Or (dbo_ACADEMIC.APP_DECISION)="reg") AND ((dbo_Recruiter_Contact_Prospect_Select1.Select_Recruiter)=Yes) AND ((dbo_SemesterInfo.offset)=0));

dbo_Recruiter_Contact_Prospect_Select is a view comprised of two tables.
 
I suspect you just got lucky the first time and that the SQL statement is doing just what it was written to do.

YOu didn't say just what the SQL statement was or wasn't doing, so I'll go with the assumption that it isn't returning the desired recordset.

You have a fairly involved WHERE clause, so to troubleshoot I recommend that you break you SQL statement and WHERE clause into several stacked queries to allow you to progressively check your results.

For example the first query would filter by: Select_Recruiter, the second by Offset, etc.

Cheers,
Bill



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top