Any work-around when OE table and/or field names contain hyp

Posted by A_Haddad on 19-Nov-2015 01:35

While Progress ABL/4GL allows table and field names to be created with with hyphens or underscore characters, under SQL92, neither table names nor field names may contain hyphens or underscore characters as dashes or hyphens in table or field names are considered special characters. 

When using ODBC or JDBC drivers, we can enclose the table or field names with hyphenated table and field names in double quotes: SELECT "code-cust" FROM customer...

In Corticon Studio, such field names are listed and we can use them for mapping as normal fields. But when executing rule-flows, we have exceptions like this:

  • javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not prepare statement...
  • Column "EREUCDO0_.CODE" cannot be found or is not specified for query. (13865)

Enclosing these field name between quotes in Corticon studio is also possible, but rule-flow will not compile anymore:

[javac] C:\Tupperware\Apps\CorticonStudio54_work\STU\CcServerSandbox\DoNotDelete\Compilation\C2_1447918361482.011143\corticoncdo\EPRCDO.java:126: error: ')' expected
[javac] @Column(name=""CODE-CO"")
[javac] ^

So, any inspired ideas?

All Replies

Posted by A_Haddad on 20-Nov-2015 08:18

I finally defined SQL views for my tables and it worked.

This thread is closed