Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to generate table 'Create' statement?

728 views
Skip to first unread message

GW

unread,
Jun 5, 2008, 12:12:38 PM6/5/08
to
Hi

I used to be able to export a new table into a "Create" syntax from inside
the PB database painter but for some unexplained reason that produces
inconsistent results now. Until I get that resolved, I was wondering if
there is a way to produce that syntax in either Sybase Central or
Interactive SQL? All the tools I've seen so far have dealt with exporting
data

Any guidance would be appreciated

Thanks


Reg Domaratzki (Sybase iAnywhere)

unread,
Jun 5, 2008, 12:56:32 PM6/5/08
to
Connect to your SQL Anywhere database with Sybase Central,
go into the list of tables for your database, right click
on the table and choose "copy". Go into the text editor
of your choice and select "paste". Here's the rsult I
got from the Admin table defined in the database I happened
to ahve running.

CREATE TABLE "DBA"."Admin" (
"admin_id" numeric(20,0) NOT NULL DEFAULT global autoincrement
(10000000),
"data" varchar(30) NULL,
PRIMARY KEY ( "admin_id" ASC )
);

I believe this works in version of Sybase Central that shipped
with SQL Anywhere v10 and up.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Docs : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swd/base.do
-> Choose SQL Anywhere Studio
-> Set filter to "Display ALL platforms IN ALL MONTHS"


"GW" <gw@gw> wrote in news:48481076$1@forums-1-dub:

GW

unread,
Jun 5, 2008, 2:24:23 PM6/5/08
to
Thanks Reg

Although it doesn't produce the full script like PB ie font settings etc I
can live with it. FYI your suggestion also works in version 9.

Thanks again

Greg

"Reg Domaratzki (Sybase iAnywhere)" <FirstName...@ianywhere.com> wrote
in message news:Xns9AB483A855018...@10.22.241.106...

Chris Keating (Sybase iAnywhere)

unread,
Jun 5, 2008, 2:45:08 PM6/5/08
to
SQL Anywhere does not know (and should not know) that the database was
used with PB and as such would not include information from the PB
Repository tables (the font settings are from the PB repository tables).
You can manually get the repository table information in a SQL format
using the UNLOAD statement SQL format.
--

Chris Keating

****************************************
Please only post to the newsgroup

SQL Anywhere Developer Community
http://www.sybase.com/developer/library/sql-anywhere-techcorner
SQL Anywhere Blog Center
http://www.sybase.com/sqlanyblogs
Maintenance releases and EBFs
http://downloads.sybase.com/swx/sdmain.stm
Use Case Express to report bugs
http://case-express.sybase.com

GW

unread,
Jun 5, 2008, 4:26:28 PM6/5/08
to
Thanks for the info Chris, as long as I can build the table into a fully
operation state then I'm happy.....but another question regarding
scripts....

if I add and delete a few cols within Sybase Central can it store those
changes in some sort of activity log to capture? I can't see where/how to
get it to do that

Thanks again

Greg

"Chris Keating (Sybase iAnywhere)" <keating_...@ianywhere.com> wrote
in message news:48483434$1@forums-1-dub...

Paul Horan[TeamSybase]

unread,
Jun 5, 2008, 7:46:00 PM6/5/08
to
Try PowerDesigner!!

Paul Horan[TeamSybase]

"GW" <gw@gw> wrote in message news:48484bf4$1@forums-1-dub...

GW

unread,
Jun 5, 2008, 8:40:52 PM6/5/08
to
I'm sure it's good (with many extra tools)..... but hard to justify right
now why I should pay for something like that when PB has been doing this
scripting faithfully for me for years...until lately

"Paul Horan[TeamSybase]" <phoran AT sybase DOT com> wrote in message
news:48487ab8$1@forums-1-dub...

R. Pods

unread,
Jun 18, 2008, 11:25:44 AM6/18/08
to
AFAIK PowerDesigner (Physical Model) has for some time been part of SQL
Anywhere Studio. If you're using SQLA 9, you might be able to install
PowerDesigner from the installation CD.

Reengineer your database, save the model, make your changes and let
PowerDesigner generate the corresponding script.

Reimer

0 new messages