データベースを MS SQL から MySQL に移行しました。
レポートを実行すると、次のエラーが表示されるようになりました。
Application Execution Exception
Error Type: database : 0
Error Messages: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2 YEAR(res_created) AS responseYear FROM Responses INNER JOIN ' at line 1
送信された SQL:
SELECT DISTINCT TOP #arguments.yearsToReturn# YEAR(res_created) AS responseYear
FROM
Responses
INNER JOIN
Questions ON Responses.question_id = Questions.question_id
INNER JOIN
Lookup_Survey_Questions ON Questions.question_id = Lookup_Survey_Questions.question_id
INNER JOIN
Survey ON Lookup_Survey_Questions.survey_id = Survey.survey_id
INNER JOIN
School ON Survey.sch_id = School.sch_id
INNER JOIN
Authority ON School.auth_id = Authority.auth_id
WHERE
Authority.auth_id = #arguments.authorityID#
AND
Questions.question_id = #arguments.questionID#
AND
Responses.survey_id IN (SELECT Survey.survey_id FROM Survey where Survey.sch_id in (SELECT School.sch_id FROM School where auth_id=#arguments.authorityID#))
ORDER BY
responseYear ASC
どうすれば解決できますか?
ありがとう