The SQL Query Builder application was not properly handling the "_" in field names for COBOL files. The issue is actually on field names with an with embedded "-" (dash rather than underscore). The problem was that table names were surrounded with double quotes everywhere in the generated statement except in the JOIN part. The logic has been corrected to add double quotation marks to the JOIN part of the statement.