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.

How to NOT generate the first "drop temporary table" statement? (modify script)

5 posts in General Discussion Last posting was on 2012-12-24 06:26:37.0Z
Michael Heilmann Posted on 2012-11-21 16:46:05.0Z
Sender: d21.50acc7f9.1804289383@sybase.com
From: Michael Heilmann
Newsgroups: sybase.public.powerdesigner.general
Subject: How to NOT generate the first "drop temporary table" statement? (modify script)
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50ad054d.13da.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 21 Nov 2012 08:46:05 -0800
X-Trace: forums-1-dub 1353516365 172.20.134.41 (21 Nov 2012 08:46:05 -0800)
X-Original-Trace: 21 Nov 2012 08:46:05 -0800, 172.20.134.41
Lines: 27
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerdesigner.general:30955
Article PK: 834329

Hi all,

When generating a modify script (for DB2)... the first
drop-statement for temporary tables should not be generated.

for example:
1) drop table "tmp_TBL_PERSON"; <== NOT NEEDED!
2) create table "tmp_TBL_PERSON"...
3) insert into "tmp_TBL_PERSON"...select...from TBL_PERSON
4) drop table TBL_PERSON;
5) create table TBL_PERSON
6) insert into TBL_PERSON...select...from "tmp_TBL_PERSON"
7) drop table "tmp_TBL_PERSON";

The drop-statement at the end (see 7) can be controlled via
configuration. (Dialog "Apply Model Changes to Database";
"Modify objects in the database" -> "Backup tables"->"Drop
temporary tables")

BUT it seems, that you can not disable the generation of the
first drop-statement (see 1).

Any help would be appreciated,

Michael

PS: I use PowerDesigner v16.1


Ondra D. Posted on 2012-11-22 13:09:10.0Z
Sender: 4bc3.50ae14b9.1804289383@sybase.com
From: Ondra D.
Newsgroups: sybase.public.powerdesigner.general
Subject: Re: How to NOT generate the first "drop temporary table" statement? (modify script)
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50ae23f6.505b.1681692777@sybase.com>
References: <50ad054d.13da.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 22 Nov 2012 05:09:10 -0800
X-Trace: forums-1-dub 1353589750 172.20.134.41 (22 Nov 2012 05:09:10 -0800)
X-Original-Trace: 22 Nov 2012 05:09:10 -0800, 172.20.134.41
Lines: 46
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerdesigner.general:30956
Article PK: 834326

Hi Michael,

for first time generation (Generate database) it is easy.
You just modify Drop Table checkbox in Database - Generate
Database - Options - Drop Table checkbox.

For creating modify script it is a bit complicated. You have
to modify this option prior to applying changes to database.
Go to table properties - Preview - Show Generation Options
and deselect Drop Table checkbox. Then try Database - Apply
model changes to database.

Regards,
Ondrej Divis

> Hi all,
>
> When generating a modify script (for DB2)... the first
> drop-statement for temporary tables should not be
> generated.
>
> for example:
> 1) drop table "tmp_TBL_PERSON"; <== NOT NEEDED!
> 2) create table "tmp_TBL_PERSON"...
> 3) insert into "tmp_TBL_PERSON"...select...from TBL_PERSON
> 4) drop table TBL_PERSON;
> 5) create table TBL_PERSON
> 6) insert into TBL_PERSON...select...from "tmp_TBL_PERSON"
> 7) drop table "tmp_TBL_PERSON";
>
> The drop-statement at the end (see 7) can be controlled
> via configuration. (Dialog "Apply Model Changes to
> Database"; "Modify objects in the database" -> "Backup
> tables"->"Drop temporary tables")
>
> BUT it seems, that you can not disable the generation of
> the first drop-statement (see 1).
>
> Any help would be appreciated,
>
> Michael
>
> PS: I use PowerDesigner v16.1


Michael Heilmann Posted on 2012-11-23 11:05:00.0Z
Sender: d7b.50af48fa.1804289383@sybase.com
From: Michael Heilmann
Newsgroups: sybase.public.powerdesigner.general
Subject: Re: How to NOT generate the first "drop temporary table" statement? (modify script)
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50af585c.110f.1681692777@sybase.com>
References: <50ae23f6.505b.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 23 Nov 2012 03:05:00 -0800
X-Trace: forums-1-dub 1353668700 172.20.134.41 (23 Nov 2012 03:05:00 -0800)
X-Original-Trace: 23 Nov 2012 03:05:00 -0800, 172.20.134.41
Lines: 61
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerdesigner.general:30957
Article PK: 834333

Hi Ondrej,

many thanks for your response!

I'm not sure if we are talking about the same thing. It's
not about the drop statement for the original table! (in my
example, point 4)

I mean the drop statement for the automatically generated
temporary table. (in my example, point 1) For this temporary
table, there are no table properties...

Thanks and regards
Michael

> Hi Michael,
>
> for first time generation (Generate database) it is easy.
> You just modify Drop Table checkbox in Database - Generate
> Database - Options - Drop Table checkbox.
>
> For creating modify script it is a bit complicated. You
> have to modify this option prior to applying changes to
> database. Go to table properties - Preview - Show
> Generation Options and deselect Drop Table checkbox. Then
> try Database - Apply model changes to database.
>
> Regards,
> Ondrej Divis
>
>
>
>
> > Hi all,
> >
> > When generating a modify script (for DB2)... the first
> > drop-statement for temporary tables should not be
> > generated.
> >
> > for example:
> > 1) drop table "tmp_TBL_PERSON"; <== NOT NEEDED!
> > 2) create table "tmp_TBL_PERSON"...
> > 3) insert into "tmp_TBL_PERSON"...select...from
> > TBL_PERSON 4) drop table TBL_PERSON;
> > 5) create table TBL_PERSON
> > 6) insert into TBL_PERSON...select...from
> > "tmp_TBL_PERSON" 7) drop table "tmp_TBL_PERSON";
> >
> > The drop-statement at the end (see 7) can be controlled
> > via configuration. (Dialog "Apply Model Changes to
> > Database"; "Modify objects in the database" -> "Backup
> > tables"->"Drop temporary tables")
> >
> > BUT it seems, that you can not disable the generation of
> > the first drop-statement (see 1).
> >
> > Any help would be appreciated,
> >
> > Michael
> >
> > PS: I use PowerDesigner v16.1