S
Student Databaser
So after trying about a million things, i figured out how to use the switch
function, but now for some reason it is excluding some records. When i run
the switch query it comes up with 2464 records, and when i run the query just
of that field i get 4786. I did include null entries and zeros and i just
cant figure out what might be causing this. Is there a common error that i
should be aware of?
Here is my SQL for the 2 queries
Returns 2464 records
SELECT DEMOGRAPHIC.WORK, STUDENT_COURSE.DATE_OF_REGISTRATION,
DEMOGRAPHIC.WORK, STUDENT.STUDENT_ID
FROM (STUDENT INNER JOIN DEMOGRAPHIC ON STUDENT.STUDENT_ID =
DEMOGRAPHIC.STUDENT_ID) INNER JOIN STUDENT_COURSE ON STUDENT.STUDENT_ID =
STUDENT_COURSE.STUDENT_ID
WHERE (((DEMOGRAPHIC.WORK)="1")) OR (((DEMOGRAPHIC.WORK)="2")) OR
(((DEMOGRAPHIC.WORK)="3")) OR (((DEMOGRAPHIC.WORK)="0")) OR
(((DEMOGRAPHIC.WORK) Is Null)) OR
(((DEMOGRAPHIC.WORK)=Switch(4,19,5,19,6,19,7,19,8,19,8,19,9,19,10,19,11,19,12,19,13,19)
And (DEMOGRAPHIC.WORK)=Switch(14,19,15,19,16,19,17,19,18,19,19,19)));
Here is the one that returns 4789 records
SELECT DEMOGRAPHIC.STUDENT_ID, DEMOGRAPHIC.WORK,
STUDENT_COURSE.DATE_OF_REGISTRATION
FROM (STUDENT INNER JOIN DEMOGRAPHIC ON STUDENT.STUDENT_ID =
DEMOGRAPHIC.STUDENT_ID) INNER JOIN STUDENT_COURSE ON STUDENT.STUDENT_ID =
STUDENT_COURSE.STUDENT_ID;
function, but now for some reason it is excluding some records. When i run
the switch query it comes up with 2464 records, and when i run the query just
of that field i get 4786. I did include null entries and zeros and i just
cant figure out what might be causing this. Is there a common error that i
should be aware of?
Here is my SQL for the 2 queries
Returns 2464 records
SELECT DEMOGRAPHIC.WORK, STUDENT_COURSE.DATE_OF_REGISTRATION,
DEMOGRAPHIC.WORK, STUDENT.STUDENT_ID
FROM (STUDENT INNER JOIN DEMOGRAPHIC ON STUDENT.STUDENT_ID =
DEMOGRAPHIC.STUDENT_ID) INNER JOIN STUDENT_COURSE ON STUDENT.STUDENT_ID =
STUDENT_COURSE.STUDENT_ID
WHERE (((DEMOGRAPHIC.WORK)="1")) OR (((DEMOGRAPHIC.WORK)="2")) OR
(((DEMOGRAPHIC.WORK)="3")) OR (((DEMOGRAPHIC.WORK)="0")) OR
(((DEMOGRAPHIC.WORK) Is Null)) OR
(((DEMOGRAPHIC.WORK)=Switch(4,19,5,19,6,19,7,19,8,19,8,19,9,19,10,19,11,19,12,19,13,19)
And (DEMOGRAPHIC.WORK)=Switch(14,19,15,19,16,19,17,19,18,19,19,19)));
Here is the one that returns 4789 records
SELECT DEMOGRAPHIC.STUDENT_ID, DEMOGRAPHIC.WORK,
STUDENT_COURSE.DATE_OF_REGISTRATION
FROM (STUDENT INNER JOIN DEMOGRAPHIC ON STUDENT.STUDENT_ID =
DEMOGRAPHIC.STUDENT_ID) INNER JOIN STUDENT_COURSE ON STUDENT.STUDENT_ID =
STUDENT_COURSE.STUDENT_ID;