Exclude specific records from query

In the attached code I added...
     AND (h.JobCode <> 3 OR h.JobCode <>5)
What I want is to not include the record if the JobCode for that record is 3 or if the JobCode is 5.  The query runs with my code but the records with JobCode 3 and 5 are still being included. Can you please show me what I am doing wrong.

	u.UserName as Supervisor, 
	'Begin' as 'Type', 
	CONVERT(varchar, FLOOR(a.Tardy / 60.0)) + ':' + RIGHT('0' + CONVERT(varchar, a.Tardy % 60),2) AS HrMin,
		CONVERT(varchar(20), s.TimeIn, 100) AS Expected, 
		l.LastName + ', ' + l.FirstName AS Name, 
		CONVERT(varchar(20), MIN(h.TimeIn), 100) AS Actual, 
			CASE WHEN s.TimeIn < MIN(h.TimeIn) THEN DATEDIFF(MINUTE, s.TimeIn, ISNULL(MIN(h.TimeIn), s.TimeIn)) END AS Tardy, 
		MIN(h.RecordId) AS RecordId
     FROM dbo.EmployeeHours AS h 
	INNER JOIN dbo.EmployeeSchedules AS s ON h.EmployeeId = s.EmployeeId 
		AND DATEADD(day, 0, DATEDIFF(DAY, 0, s.TimeIn)) = DATEADD(DAY, 0, DATEDIFF(DAY, 0,h.TimeIn)) 
	INNER JOIN dbo.EmployeeList AS l ON s.Company = l.Company AND s.EmployeeId = l.EmployeeId
     WHERE (l.Suspend = 0)  AND (h.JobCode <> 3 OR h.JobCode <>5) AND (DATEADD(DAY, 0, DATEDIFF(DAY, 0, h.TimeIn)) 
     BETWEEN @From AND @To)AND Class in (2,4,6,7) 
GROUP BY l.EmployeeId, l.ManagerUID, s.TimeIn, l.LastName, l.FirstName) AS a 
	LEFT OUTER JOIN dbo.UserList AS u ON a.ManagerUID = u.UID 
	LEFT OUTER JOIN dbo.EmployeeShiftNotes AS n ON a.RecordId = n.RecordId AND a.EmployeeId = n.EmployeeId
WHERE (a.Tardy >= 0)  
 AND (u.UserName = @Supervisor)
 AND u.Company = 1

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornSQL Server Data DudeCommented:
AND h.JobCode NOT IN (3, 5)


AND (h.JobCode <> 3 AND h.JobCode <>5)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BobRosasAuthor Commented:
They both worked!  Thank you so much for your quick response and great code!
Jim HornSQL Server Data DudeCommented:
Thanks for the grade.  Good luck with your project.  -Jim
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.