I am getting a "COBES0100 : Incorrect SQL statement syntax near: RESULT" when I try building my project. RESULT is a column name in one of my tables. This code is coming over from Acucobol, where It compiles and runs with no problem. According to the documentation the COBES0100 error may come if the SQL directive BEHAVIOR is set to MAINFRAME, but I have it set to ANSI. I am getting it as well for column name DATASET and APPLICATION. Am I doing something wrong or will I have to change the Column name in the SQL Server database?
I am getting a "COBES0100 : Incorrect SQL statement syntax near: RESULT" when I try building my project. RESULT is a column name in one of my tables. This code is coming over from Acucobol, where It compiles and runs with no problem. According to the documentation the COBES0100 error may come if the SQL directive BEHAVIOR is set to MAINFRAME, but I have it set to ANSI. I am getting it as well for column name DATASET and APPLICATION. Am I doing something wrong or will I have to change the Column name in the SQL Server database?
Put the column name in quotes like "RESULT" in the query or use a table alias with it like:
EXEC SQL
SELECT
A.result
INTO
:mfcustomers-result:mfcustomers-result-NULL
FROM mfcustomers A
WHERE (A.cust_no = :mfcustomers-cust-no)
END-EXEC
I am getting a "COBES0100 : Incorrect SQL statement syntax near: RESULT" when I try building my project. RESULT is a column name in one of my tables. This code is coming over from Acucobol, where It compiles and runs with no problem. According to the documentation the COBES0100 error may come if the SQL directive BEHAVIOR is set to MAINFRAME, but I have it set to ANSI. I am getting it as well for column name DATASET and APPLICATION. Am I doing something wrong or will I have to change the Column name in the SQL Server database?
Thanks Chris
That worked and thanks for the quick response.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.