Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Incorrect syntax near the keyword 'WHERE'

Posted on 2007-12-06
3
Medium Priority
?
183 Views
Last Modified: 2010-03-20
I'm just not seeing it...probably because I have a headhache:


SELECT	st.iStudentID,
			clp.iProjectID,
			clp.vchTitle,
			cpop.iClassProjectID,
			cl.siLessonNumber,
			st.vchUserName,
			st.vchFirstName,
			st.vchLastName,
			st.bEnabled,
			cse.iClassEnrollID
	FROM Student st (nolock)
		JOIN Class_StudentEnroll cse
		JOIN Student_Program sp ON sp.iStudentID = st.iStudentID
		JOIN vClassProgramOutcomeProjects cpop ON cpop.iProgramID = sp.iProgramID
		JOIN ClassLessonProject clp ON clp.iProjectID = clgp.iClassItemID
		JOIN ClassLesson cl ON cl.iClassLessonID = clp.iClassLessonID
		JOIN classGradePoint clgp ON clp.iClassLessonID = cl.iClassLessonID
		JOIN ClassLessonProject clp ON clp.iProjectID = clgp.iClassItemID
	WHERE ((cse.chLetterGrade IS NULL) OR (cse.chLetterGrade <> 'EW'))
		AND cse.bWithdrawn = 0
		AND cse.chEnrollType = 'STU'
		AND cse.iClassID = 9482

Open in new window

0
Comment
Question by:dba123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 25

Accepted Solution

by:
imitchie earned 1000 total points
ID: 20423219
SELECT  st.iStudentID,
                        clp.iProjectID,
                        clp.vchTitle,
                        cpop.iClassProjectID,
                        cl.siLessonNumber,
                        st.vchUserName,
                        st.vchFirstName,
                        st.vchLastName,
                        st.bEnabled,
                        cse.iClassEnrollID
        FROM Student st (nolock)
                JOIN Class_StudentEnroll cse   ------- join condition needed here
                JOIN Student_Program sp ON sp.iStudentID = st.iStudentID
                JOIN vClassProgramOutcomeProjects cpop ON cpop.iProgramID = sp.iProgramID
                JOIN ClassLessonProject clp ON clp.iProjectID = clgp.iClassItemID
                JOIN ClassLesson cl ON cl.iClassLessonID = clp.iClassLessonID
                JOIN classGradePoint clgp ON clp.iClassLessonID = cl.iClassLessonID
                JOIN ClassLessonProject clp ON clp.iProjectID = clgp.iClassItemID
        WHERE ((cse.chLetterGrade IS NULL) OR (cse.chLetterGrade <> 'EW'))
                AND cse.bWithdrawn = 0
                AND cse.chEnrollType = 'STU'
                AND cse.iClassID = 9482
0
 
LVL 25

Expert Comment

by:imitchie
ID: 20423220
check the ----- line above ^^^
0
 
LVL 1

Author Comment

by:dba123
ID: 20423226
crap...thanks.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question