Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Need for Modifying Generated DDL

3 posts in General Discussion Last posting was on 2013-01-10 20:51:57.0Z
sdupadhye Posted on 2013-01-10 00:00:35.0Z
Sender: 6a7d.50edfed7.1804289383@sybase.com
From: sdupadhye
Newsgroups: sybase.public.powerdesigner.general
Subject: Need for Modifying Generated DDL
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50ee04a3.6bc2.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 9 Jan 2013 16:00:35 -0800
X-Trace: forums-1-dub 1357776035 172.20.134.41 (9 Jan 2013 16:00:35 -0800)
X-Original-Trace: 9 Jan 2013 16:00:35 -0800, 172.20.134.41
Lines: 49
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerdesigner.general:30985
Article PK: 1158883

Hi,

Apologies if I am duplicating a question already asked (&
Answered.)

I wish to modify the DDL Statement Generated for an object
while generating the Database. I am not doing Reverse
Engineering.

Here's an example to best explain.

Say I have a Table in the model. Tab_1. When I go to
Generate DDL for it either via Preview tab or through
Generate Database / Apply Changes. The DDL will typically
look like

Create Table TAB_1
(COL_1 NUMBER(10),
COL_2 NUMBER(10)
);

create index INDEX_IX1 on TAB_1 ( COL_1 ASC);

Instead I want it to look like

BEGIN
PROCEDURE_NAME("

Create Table TAB_1
(COL_1 NUMBER(10),
COL_2 NUMBER(10)
);
");
END;

BEGIN
PROCEDURE_NAME("
create index INDEX_IX1 on TAB_1 ( COL_1 ASC);
");
END;

I know if I went through the Begin and End Script option on
the Table Properties, I can do this. However it only applies
to the Table's own DDL. For the Indexes on the table, the
Begin & End Scripts don't apply.

Is there a way to make modifications to the generated DDL ?

Thanks in advance for the time invested.


Ondra D. Posted on 2013-01-10 09:29:20.0Z
Sender: 9fd.50ee8852.1804289383@sybase.com
From: Ondra D.
Newsgroups: sybase.public.powerdesigner.general
Subject: Re: Need for Modifying Generated DDL
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50ee89f0.a99.1681692777@sybase.com>
References: <50ee04a3.6bc2.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 10 Jan 2013 01:29:20 -0800
X-Trace: forums-1-dub 1357810160 172.20.134.41 (10 Jan 2013 01:29:20 -0800)
X-Original-Trace: 10 Jan 2013 01:29:20 -0800, 172.20.134.41
Lines: 62
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerdesigner.general:30986
Article PK: 1158892

Hi,

you will have to do it separately for all kinds of objects
you want to affect. If you want to make such a system change
for all objects I suggest modifying your DBMS file (backup
first!). Database - Edit Current DBMS... and then edit
Script\Objects\Table\Create for Table. But be careful, this
will also affect reverse engineering from DDL scripts.

Regards,
Ondrej Divis

> Hi,
>
> Apologies if I am duplicating a question already asked
> (& Answered.)
>
> I wish to modify the DDL Statement Generated for an object
> while generating the Database. I am not doing Reverse
> Engineering.
>
> Here's an example to best explain.
>
> Say I have a Table in the model. Tab_1. When I go to
> Generate DDL for it either via Preview tab or through
> Generate Database / Apply Changes. The DDL will typically
> look like
>
> Create Table TAB_1
> (COL_1 NUMBER(10),
> COL_2 NUMBER(10)
> );
>
> create index INDEX_IX1 on TAB_1 ( COL_1 ASC);
>
> Instead I want it to look like
>
> BEGIN
> PROCEDURE_NAME("
>
> Create Table TAB_1
> (COL_1 NUMBER(10),
> COL_2 NUMBER(10)
> );
> ");
> END;
>
> BEGIN
> PROCEDURE_NAME("
> create index INDEX_IX1 on TAB_1 ( COL_1 ASC);
> ");
> END;
>
> I know if I went through the Begin and End Script option
> on the Table Properties, I can do this. However it only
> applies to the Table's own DDL. For the Indexes on the
> table, the Begin & End Scripts don't apply.
>
> Is there a way to make modifications to the generated DDL
> ?
>
> Thanks in advance for the time invested.


sdupadhye Posted on 2013-01-10 20:51:57.0Z
Sender: 2c6e.50eeec72.1804289383@sybase.com
From: sdupadhye
Newsgroups: sybase.public.powerdesigner.general
Subject: Re: Need for Modifying Generated DDL
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50ef29ed.3c51.1681692777@sybase.com>
References: <50ee89f0.a99.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 10 Jan 2013 12:51:57 -0800
X-Trace: forums-1-dub 1357851117 172.20.134.41 (10 Jan 2013 12:51:57 -0800)
X-Original-Trace: 10 Jan 2013 12:51:57 -0800, 172.20.134.41
Lines: 71
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerdesigner.general:30988
Article PK: 1158913

Hi,

Thanks a million! This is exactly what I was looking for.

Regards

Sameer

> Hi,
>
> you will have to do it separately for all kinds of objects
> you want to affect. If you want to make such a system
> change for all objects I suggest modifying your DBMS file
> (backup first!). Database - Edit Current DBMS... and then
> edit Script\Objects\Table\Create for Table. But be careful
> , this will also affect reverse engineering from DDL
> scripts.
>
> Regards,
> Ondrej Divis
>
> > Hi,
> >
> > Apologies if I am duplicating a question already
> > asked (& Answered.)
> >
> > I wish to modify the DDL Statement Generated for an
> > object while generating the Database. I am not doing
> > Reverse Engineering.
> >
> > Here's an example to best explain.
> >
> > Say I have a Table in the model. Tab_1. When I go to
> > Generate DDL for it either via Preview tab or through
> > Generate Database / Apply Changes. The DDL will
> > typically look like
> >
> > Create Table TAB_1
> > (COL_1 NUMBER(10),
> > COL_2 NUMBER(10)
> > );
> >
> > create index INDEX_IX1 on TAB_1 ( COL_1 ASC);
> >
> > Instead I want it to look like
> >
> > BEGIN
> > PROCEDURE_NAME("
> >
> > Create Table TAB_1
> > (COL_1 NUMBER(10),
> > COL_2 NUMBER(10)
> > );
> > ");
> > END;
> >
> > BEGIN
> > PROCEDURE_NAME("
> > create index INDEX_IX1 on TAB_1 ( COL_1 ASC);
> > ");
> > END;
> >
> > I know if I went through the Begin and End Script option
> > on the Table Properties, I can do this. However it only
> > applies to the Table's own DDL. For the Indexes on the
> > table, the Begin & End Scripts don't apply.
> >
> > Is there a way to make modifications to the generated
> > DDL ?
> >
> > Thanks in advance for the time invested.