• JaybeeSQL - Thursday, April 26, 2018 5:00 PM

    Lynn Pettis - Thursday, April 26, 2018 4:20 PM

    Post your code that is getting the error.

    --Determining When Students Enrol and Cancel
    Select  (ContactEnrollDate)
    From PersonalProfiles
    WHERE YEAR ContractEnrollDate = 2006 AND (MONTH ContractEnrollDate in (3,12))
     and  (ContactEnrollDate)  is not null and ContactCancelDate is not null  and LastAttended is not null

    YEAR is a function and you are missing the () around ContractEnrollDate.

    Select
     ContactEnrollDate
    From PersonalProfiles
    WHERE
     YEAR(ContractEnrollDate) = 2006
     AND (MONTH (ContractEnrollDate) in (3,12))
     AND (ContactEnrollDate) is not null
     AND ContactCancelDate is not null
     AND LastAttended is not null ;