Incorrect SQL statement syntax near: WITH
The following complex query compiles fine in Net Express:
DECLARE cursor0 CURSOR FOR
SELECT col1, col2,
CASE WHEN ...
THEN (SELECT COUNT(*) FROM table1 WHERE ...)
ELSE (SELECT COUNT(*) FROM table1 WHERE...
AND EXISTS (SELECT * FROM table2 WITH (NOLOCK) WHERE ...)) END, CASE WHEN ... END
When compiling the above in Visual COBOL 2.3 for Visual Studio, the following error occurs:
COBES0100 : Incorrect SQL statement syntax near: WITH
The issue has already been addressed in Visual COBOL 2.3 Hotfix1 that is available at the Product Updates page of the Micro Focus SupportLine site.
The fix is also included in the upcoming release of Visual COBOL 2.3 Update 1.