R
ridders
Hi
I am trying to use the following crosstab SQL to run a report:
"TRANSFORM Last(LeaversGCSEResults.Grade) AS LastOfGrade SELECT
LeaversGCSEResults.PupilID, LeaversPupilData.Surname,
LeaversPupilData.Forename, LeaversPupilData.YearGroup,
LeaversPupilData.TutorGroup, LeaversPupilData.Gender,
LeaversGCSEResults.SubjectID, LeaversGCSEResults.Grade FROM
LeaversGCSEResults INNER JOIN LeaversPupilData ON LeaversGCSEResults.PupilID
= LeaversPupilData.PupilID In ('Ad', 'Af', 'Am', 'Bs', 'Ch', 'Ct', 'Da',
'Dr', 'Ds', 'El', 'En', 'Fr', 'Ge', 'Hi', 'Hs', 'Ht', 'It', 'Iv', 'Ln', 'Ma',
'Ms', 'Mu', 'PeG', 'Ps', 'Rs', 'RsS', 'Sm', 'Sp', 'Ss', 'St', 'Te', 'Tf',
'Tx') PIVOT LeaversGCSEResults.SubjectID;"
I get a syntax error (missing operator) in section after ON.
Please can anyone see what is missing where?
I have several similar reports based on crosstabs which work just fine
I am trying to use the following crosstab SQL to run a report:
"TRANSFORM Last(LeaversGCSEResults.Grade) AS LastOfGrade SELECT
LeaversGCSEResults.PupilID, LeaversPupilData.Surname,
LeaversPupilData.Forename, LeaversPupilData.YearGroup,
LeaversPupilData.TutorGroup, LeaversPupilData.Gender,
LeaversGCSEResults.SubjectID, LeaversGCSEResults.Grade FROM
LeaversGCSEResults INNER JOIN LeaversPupilData ON LeaversGCSEResults.PupilID
= LeaversPupilData.PupilID In ('Ad', 'Af', 'Am', 'Bs', 'Ch', 'Ct', 'Da',
'Dr', 'Ds', 'El', 'En', 'Fr', 'Ge', 'Hi', 'Hs', 'Ht', 'It', 'Iv', 'Ln', 'Ma',
'Ms', 'Mu', 'PeG', 'Ps', 'Rs', 'RsS', 'Sm', 'Sp', 'Ss', 'St', 'Te', 'Tf',
'Tx') PIVOT LeaversGCSEResults.SubjectID;"
I get a syntax error (missing operator) in section after ON.
Please can anyone see what is missing where?
I have several similar reports based on crosstabs which work just fine