Reputation: 91
Using PowerDesigner 16.5, I am trying to export a SQL script from a model that I have reversed from an existing Oracle schema. Some object names in this schema begin with a digit. When the script is exported, these object names are emitted verbatim (which is normally what you want) but the leading digit in the object name causes a SQL statement to be parsed incorrectly.
For example,
create table MY_SCHEMA.FOO_1234_ACTION
(
MY_ID NUMBER not null,
MY_COLUMN VARCHAR2(32)
)
/
alter table MY_SCHEMA.FOO_1234_ACTION
add constraint 1234_ACTION_PK primary key (MY_ID)
/
In the example above, the constraint name begins with a digit causing this statement to be mis-parsed resulting in ORA-0902 invalid datatype. If I manually edit the script to quote the constraint name, the statement is correctly parsed and the table is altered, adding the primary key:
alter table MY_SCHEMA.FOO_1234_ACTION
add constraint "1234_ACTION_PK" primary key (MY_ID)
/
I understand that maybe the name could simply be changed but I'm trying to establish a baseline from the schema we have in order to iterate it to what it needs to be.
I have looked in both the options for the Oracle database definition as well as the options on the model itself that might influence script output (such as naming conventions). Is there any way to cause PowerDesigner to, in the case of object names with leading digits, emit the name with quotes but leaving all other names alone?
Upvotes: 1
Views: 253