Hi,
using DB2MVS11 (DB2 for z/OS v11) datasource. If a table will be renamed PowerDesigner is generating scripts like
...
drop table "tmp_TABLETT";
rename table TABLETT to "tmp_TABLETT";
...
insert into TABLETTSSS (C1, C2)
select C1, C2
from "tmp_TABLETT";
Searching for the definition of the rename table syntax I found
rename [table ][%OLDQUALIFIER%]%OLDTABL% to %NEWTABL%
So the %NEWTABL% will be taken from the %OLDTABL% by adding a "tmp_" prefix. Do we have the possiblity to change "tmp_" to another value and maybe restrict the length of %NEWTABL% to 15 characters in all Statements (DROP, RENAME, and INSERT)?
If I only modify %NEWTABL% variable with %[[?][-][<x>][.[-]<y>][<options>]:]<variable>% syntax only the rename table statement will be changed. Drop and Iinsert stay at "tmp_TABLETT".
Many thanks
Robert
Request clarification before answering.
Hi George,
we had two holidays, so sorry for the delay.
Where should I enter your if-condition? I tried it in the
"DB2MVS11::Script\Objects\Table\Rename"-area instead, before, and after the line containing
rename [table ][%OLDQUALIFIER%]%OLDTABL% to %NEWTABL% ?
I allways get in the SQL-Script for the rename-modification
alter table TABLETT drop primary key;
drop index INDEX_1;
drop table "tmp_TABLETT";
1 error(s), 0 warning(s) (1) (Table "TABLETT"):
[syntax error] condition parsing error
...
Many thanks
Robert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The script is meant to completely replace the existing script. Thanls for noticing that I should have put %OLDQUALIFIER% instead of %QUALIFIER% - not sure where that came from.
If you want to keep the existing line, putting a full stop (.) at the beginning of the line will turn it into a GTL comment.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.