Reputation: 13
IF NOT EXISTS (SELECT prereqListID
FROM dbo.tblPreRequisiteList
WHERE NOT prereqListID IN (SELECT FK_prereqID
FROM dbo.tblPreReqStudentAnswers
WHERE FK_applicantID = @appID))
I have a syntax error in this statement that I can't seem to identify.
Any thoughts?
Thanks for your time.
Upvotes: 0
Views: 3068
Reputation: 453328
Executing the code in the question will give the error
Incorrect syntax near ')'.
You need to follow it with another statement/block
IF NOT EXISTS (SELECT prereqListID
FROM dbo.tblPreRequisiteList
WHERE NOT prereqListID IN (SELECT FK_prereqID
FROM dbo.tblPreReqStudentAnswers
WHERE FK_applicantID = @appID))
BEGIN
SomethingHere:
END
Upvotes: 2