Closed servilla closed 2 years ago
The error occurs because the entity name contains a semicolon character ";" within the first 30 characters of the entity name. A semicolon in this position results in a premature evaluation of the CREATE statement (see the error above). The error message notes the position value of 35 as the source of the error. This position refers to the full SQL statement and maps directly to the position of the semicolon.
CREATE TABLE Tree_seedling_density;_subplot("DBCODE"...
Position 35 ^
The method getLegalDBTableName
in the edu.lternet.past.dml.database.DatabaseAdapter.java
class attempts to replace illegal SQL characters with underscores, but the semicolon was not in this list of illegal characters. The solution is to replace all "semicolons" in entity names with an underscore.
Entity names with semicolons in the character position less than or equal to 30 results in a table create failure. Susanne Remillard reported an issue with "knb-lter-and.4023.10" from a previous attempt where the data entity
<entityName>Tree seedling density; subplot-scale means derived from entity 5</entityName>
resulted in the following error: