Informix 12.10 Finding the error point in the query when the statement could not be “prepare ”d from the query
问题 I have long query like this in the procedure CREATE PROCEDURE procedure1(var type1) DEFINE Result Type2; LET c_query = "SELECT " || "RESULT " || "FROM " || "QUERY_PART1 " || "join " || "QUERY_PART2 " || "join " || ... "END_PART "; PREPARE c_stmt FROM c_query; -- Problematic line DECLARE c_cur CURSOR FOR c_stmt; OPEN c_cur; .... END PROCEDURE But the "PREPARE c_stmt FROM c_query;" line does not run , and the error is Execute: A syntax error has occurred I Try to find syntax error of Query,