
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks Chris
That worked and thanks for the quick response.